<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-2"></span><span class="hs-comment">--</span><span>
</span><span id="line-3"></span><span class="hs-comment">-- (c) The University of Glasgow 1993-2004</span><span>
</span><span id="line-4"></span><span class="hs-comment">--</span><span>
</span><span id="line-5"></span><span class="hs-comment">-- This is the top-level module in the native code generator.</span><span>
</span><span id="line-6"></span><span class="hs-comment">--</span><span>
</span><span id="line-7"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-8"></span><span>
</span><span id="line-9"></span><span class="hs-pragma">{-# LANGUAGE BangPatterns, CPP, GADTs, ScopedTypeVariables, PatternSynonyms,
    DeriveFunctor #-}</span><span class="hs-cpp">

#if !defined(GHC_LOADED_INTO_GHCI)
</span><span class="hs-pragma">{-# LANGUAGE UnboxedTuples #-}</span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-16"></span><span class="hs-pragma">{-# OPTIONS_GHC -Wno-incomplete-record-updates #-}</span><span>
</span><span id="line-17"></span><span>
</span><span id="line-18"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.CmmToAsm</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-19"></span><span>                    </span><span class="annot"><span class="hs-comment">-- * Module entry point</span></span><span>
</span><span id="line-20"></span><span>                    </span><span class="annot"><a href="GHC.CmmToAsm.html#nativeCodeGen"><span class="hs-identifier">nativeCodeGen</span></a></span><span>
</span><span id="line-21"></span><span>
</span><span id="line-22"></span><span>                    </span><span class="annot"><span class="hs-comment">-- * Test-only exports: see trac #12744</span></span><span>
</span><span id="line-23"></span><span>                    </span><span class="hs-comment">-- used by testGraphNoSpills, which needs to access</span><span>
</span><span id="line-24"></span><span>                    </span><span class="hs-comment">-- the register allocator intermediate data structures</span><span>
</span><span id="line-25"></span><span>                    </span><span class="hs-comment">-- cmmNativeGen emits</span><span>
</span><span id="line-26"></span><span>                  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.html#cmmNativeGen"><span class="hs-identifier">cmmNativeGen</span></a></span><span>
</span><span id="line-27"></span><span>                  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Monad.html#NcgImpl"><span class="hs-identifier">NcgImpl</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span>
</span><span id="line-28"></span><span>                  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.html#x86NcgImpl"><span class="hs-identifier">x86NcgImpl</span></a></span><span>
</span><span id="line-29"></span><span>                  </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span class="hs-cpp">

#include &quot;HsVersions.h&quot;
</span><span>
</span><span id="line-33"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-34"></span><span>
</span><span id="line-35"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.CodeGen.html"><span class="hs-identifier">GHC.CmmToAsm.X86.CodeGen</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">X86.CodeGen</span></span><span>
</span><span id="line-36"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Regs.html"><span class="hs-identifier">GHC.CmmToAsm.X86.Regs</span></a></span><span>    </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">X86.Regs</span></span><span>
</span><span id="line-37"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Instr.html"><span class="hs-identifier">GHC.CmmToAsm.X86.Instr</span></a></span><span>   </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">X86.Instr</span></span><span>
</span><span id="line-38"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Ppr.html"><span class="hs-identifier">GHC.CmmToAsm.X86.Ppr</span></a></span><span>     </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">X86.Ppr</span></span><span>
</span><span id="line-39"></span><span>
</span><span id="line-40"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.SPARC.CodeGen.html"><span class="hs-identifier">GHC.CmmToAsm.SPARC.CodeGen</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">SPARC.CodeGen</span></span><span>
</span><span id="line-41"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.SPARC.Regs.html"><span class="hs-identifier">GHC.CmmToAsm.SPARC.Regs</span></a></span><span>    </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">SPARC.Regs</span></span><span>
</span><span id="line-42"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.SPARC.Instr.html"><span class="hs-identifier">GHC.CmmToAsm.SPARC.Instr</span></a></span><span>   </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">SPARC.Instr</span></span><span>
</span><span id="line-43"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.SPARC.Ppr.html"><span class="hs-identifier">GHC.CmmToAsm.SPARC.Ppr</span></a></span><span>     </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">SPARC.Ppr</span></span><span>
</span><span id="line-44"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.SPARC.ShortcutJump.html"><span class="hs-identifier">GHC.CmmToAsm.SPARC.ShortcutJump</span></a></span><span>   </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">SPARC.ShortcutJump</span></span><span>
</span><span id="line-45"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.SPARC.CodeGen.Expand.html"><span class="hs-identifier">GHC.CmmToAsm.SPARC.CodeGen.Expand</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">SPARC.CodeGen.Expand</span></span><span>
</span><span id="line-46"></span><span>
</span><span id="line-47"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.PPC.CodeGen.html"><span class="hs-identifier">GHC.CmmToAsm.PPC.CodeGen</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">PPC.CodeGen</span></span><span>
</span><span id="line-48"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Regs.html"><span class="hs-identifier">GHC.CmmToAsm.PPC.Regs</span></a></span><span>    </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">PPC.Regs</span></span><span>
</span><span id="line-49"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.PPC.RegInfo.html"><span class="hs-identifier">GHC.CmmToAsm.PPC.RegInfo</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">PPC.RegInfo</span></span><span>
</span><span id="line-50"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Instr.html"><span class="hs-identifier">GHC.CmmToAsm.PPC.Instr</span></a></span><span>   </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">PPC.Instr</span></span><span>
</span><span id="line-51"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Ppr.html"><span class="hs-identifier">GHC.CmmToAsm.PPC.Ppr</span></a></span><span>     </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">PPC.Ppr</span></span><span>
</span><span id="line-52"></span><span>
</span><span id="line-53"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html"><span class="hs-identifier">GHC.CmmToAsm.Reg.Liveness</span></a></span><span>
</span><span id="line-54"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.html"><span class="hs-identifier">GHC.CmmToAsm.Reg.Linear</span></a></span><span>                </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Linear</span></span><span>
</span><span id="line-55"></span><span>
</span><span id="line-56"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="GHC.Data.Graph.Color.html"><span class="hs-identifier">GHC.Data.Graph.Color</span></a></span><span>                   </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Color</span></span><span>
</span><span id="line-57"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.html"><span class="hs-identifier">GHC.CmmToAsm.Reg.Graph</span></a></span><span>                 </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Color</span></span><span>
</span><span id="line-58"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.Stats.html"><span class="hs-identifier">GHC.CmmToAsm.Reg.Graph.Stats</span></a></span><span>           </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Color</span></span><span>
</span><span id="line-59"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.TrivColorable.html"><span class="hs-identifier">GHC.CmmToAsm.Reg.Graph.TrivColorable</span></a></span><span>   </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Color</span></span><span>
</span><span id="line-60"></span><span>
</span><span id="line-61"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Asm.html"><span class="hs-identifier">GHC.Utils.Asm</span></a></span><span>
</span><span id="line-62"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Target.html"><span class="hs-identifier">GHC.CmmToAsm.Reg.Target</span></a></span><span>
</span><span id="line-63"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#"><span class="hs-identifier">GHC.Platform</span></a></span><span>
</span><span id="line-64"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.BlockLayout.html"><span class="hs-identifier">GHC.CmmToAsm.BlockLayout</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">BlockLayout</span></span><span>
</span><span id="line-65"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Settings.Config.html"><span class="hs-identifier">GHC.Settings.Config</span></a></span><span>
</span><span id="line-66"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Instr.html"><span class="hs-identifier">GHC.CmmToAsm.Instr</span></a></span><span>
</span><span id="line-67"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.PIC.html"><span class="hs-identifier">GHC.CmmToAsm.PIC</span></a></span><span>
</span><span id="line-68"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html"><span class="hs-identifier">GHC.Platform.Reg</span></a></span><span>
</span><span id="line-69"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.Class.html"><span class="hs-identifier">GHC.Platform.Reg.Class</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Platform.Reg.Class.html#RegClass"><span class="hs-identifier">RegClass</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-70"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Monad.html"><span class="hs-identifier">GHC.CmmToAsm.Monad</span></a></span><span>
</span><span id="line-71"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.CFG.html"><span class="hs-identifier">GHC.CmmToAsm.CFG</span></a></span><span>
</span><span id="line-72"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Dwarf.html"><span class="hs-identifier">GHC.CmmToAsm.Dwarf</span></a></span><span>
</span><span id="line-73"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Config.html"><span class="hs-identifier">GHC.CmmToAsm.Config</span></a></span><span>
</span><span id="line-74"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html"><span class="hs-identifier">GHC.Cmm.DebugBlock</span></a></span><span>
</span><span id="line-75"></span><span>
</span><span id="line-76"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.BlockId.html"><span class="hs-identifier">GHC.Cmm.BlockId</span></a></span><span>
</span><span id="line-77"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.StgToCmm.CgUtils.html"><span class="hs-identifier">GHC.StgToCmm.CgUtils</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.StgToCmm.CgUtils.html#fixStgRegisters"><span class="hs-identifier">fixStgRegisters</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-78"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.html"><span class="hs-identifier">GHC.Cmm</span></a></span><span>
</span><span id="line-79"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.Utils.html"><span class="hs-identifier">GHC.Cmm.Utils</span></a></span><span>
</span><span id="line-80"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Collections.html"><span class="hs-identifier">GHC.Cmm.Dataflow.Collections</span></a></span><span>
</span><span id="line-81"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html"><span class="hs-identifier">GHC.Cmm.Dataflow.Label</span></a></span><span>
</span><span id="line-82"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html"><span class="hs-identifier">GHC.Cmm.Dataflow.Block</span></a></span><span>
</span><span id="line-83"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.Opt.html"><span class="hs-identifier">GHC.Cmm.Opt</span></a></span><span>           </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Cmm.Opt.html#cmmMachOpFold"><span class="hs-identifier">cmmMachOpFold</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-84"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.Ppr.html"><span class="hs-identifier">GHC.Cmm.Ppr</span></a></span><span>
</span><span id="line-85"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.CLabel.html"><span class="hs-identifier">GHC.Cmm.CLabel</span></a></span><span>
</span><span id="line-86"></span><span>
</span><span id="line-87"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Unique.FM.html"><span class="hs-identifier">GHC.Types.Unique.FM</span></a></span><span>
</span><span id="line-88"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Supply.html"><span class="hs-identifier">GHC.Types.Unique.Supply</span></a></span><span>
</span><span id="line-89"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html"><span class="hs-identifier">GHC.Driver.Session</span></a></span><span>
</span><span id="line-90"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Misc.html"><span class="hs-identifier">GHC.Utils.Misc</span></a></span><span>
</span><span id="line-91"></span><span>
</span><span id="line-92"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html"><span class="hs-identifier">GHC.Types.Basic</span></a></span><span>       </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#Alignment"><span class="hs-identifier">Alignment</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-93"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html"><span class="hs-identifier">GHC.Utils.Ppr</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Pretty</span></span><span>
</span><span id="line-94"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.BufHandle.html"><span class="hs-identifier">GHC.Utils.BufHandle</span></a></span><span>
</span><span id="line-95"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Outputable</span></span><span>
</span><span id="line-96"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html"><span class="hs-identifier">GHC.Data.FastString</span></a></span><span>
</span><span id="line-97"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Set.html"><span class="hs-identifier">GHC.Types.Unique.Set</span></a></span><span>
</span><span id="line-98"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Error.html"><span class="hs-identifier">GHC.Utils.Error</span></a></span><span>
</span><span id="line-99"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Unit.html"><span class="hs-identifier">GHC.Unit</span></a></span><span>
</span><span id="line-100"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.Stream.html"><span class="hs-identifier">GHC.Data.Stream</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Data.Stream.html#Stream"><span class="hs-identifier">Stream</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-101"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="GHC.Data.Stream.html"><span class="hs-identifier">GHC.Data.Stream</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Stream</span></span><span>
</span><span id="line-102"></span><span>
</span><span id="line-103"></span><span class="hs-comment">-- DEBUGGING ONLY</span><span>
</span><span id="line-104"></span><span class="hs-comment">--import GHC.Data.OrdList</span><span>
</span><span id="line-105"></span><span>
</span><span id="line-106"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.List.html#"><span class="hs-identifier">Data.List</span></a></span><span>
</span><span id="line-107"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Maybe.html#"><span class="hs-identifier">Data.Maybe</span></a></span><span>
</span><span id="line-108"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Ord.html#"><span class="hs-identifier">Data.Ord</span></a></span><span>         </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../base/src/Data.Ord.html#comparing"><span class="hs-identifier">comparing</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-109"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Exception.html#"><span class="hs-identifier">Control.Exception</span></a></span><span>
</span><span id="line-110"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.html#"><span class="hs-identifier">Control.Monad</span></a></span><span>
</span><span id="line-111"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/System.IO.html#"><span class="hs-identifier">System.IO</span></a></span><span>
</span><span id="line-112"></span><span>
</span><span id="line-113"></span><span class="hs-comment">{-
The native-code generator has machine-independent and
machine-dependent modules.

This module (&quot;AsmCodeGen&quot;) is the top-level machine-independent
module.  Before entering machine-dependent land, we do some
machine-independent optimisations (defined below) on the
'CmmStmts's.

We convert to the machine-specific 'Instr' datatype with
'cmmCodeGen', assuming an infinite supply of registers.  We then use
a machine-independent register allocator ('regAlloc') to rejoin
reality.  Obviously, 'regAlloc' has machine-specific helper
functions (see about &quot;RegAllocInfo&quot; below).

Finally, we order the basic blocks of the function so as to minimise
the number of jumps between blocks, by utilising fallthrough wherever
possible.

The machine-dependent bits break down as follows:

  * [&quot;MachRegs&quot;]  Everything about the target platform's machine
    registers (and immediate operands, and addresses, which tend to
    intermingle/interact with registers).

  * [&quot;MachInstrs&quot;]  Includes the 'Instr' datatype (possibly should
    have a module of its own), plus a miscellany of other things
    (e.g., 'targetDoubleSize', 'smStablePtrTable', ...)

  * [&quot;MachCodeGen&quot;]  is where 'Cmm' stuff turns into
    machine instructions.

  * [&quot;PprMach&quot;] 'pprInstr' turns an 'Instr' into text (well, really
    a 'SDoc').

  * [&quot;RegAllocInfo&quot;] In the register allocator, we manipulate
    'MRegsState's, which are 'BitSet's, one bit per machine register.
    When we want to say something about a specific machine register
    (e.g., ``it gets clobbered by this instruction''), we set/unset
    its bit.  Obviously, we do this 'BitSet' thing for efficiency
    reasons.

    The 'RegAllocInfo' module collects together the machine-specific
    info needed to do register allocation.

   * [&quot;RegisterAlloc&quot;] The (machine-independent) register allocator.
-}</span><span>
</span><span id="line-160"></span><span>
</span><span id="line-161"></span><span class="hs-comment">--------------------</span><span>
</span><span id="line-162"></span><span class="annot"><a href="GHC.CmmToAsm.html#nativeCodeGen"><span class="hs-identifier hs-type">nativeCodeGen</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-keyword">forall</span><span> </span><span id="local-6989586621681045227"><span class="annot"><a href="#local-6989586621681045227"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-operator">.</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Module.Location.html#ModLocation"><span class="hs-identifier hs-type">ModLocation</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.Handle.Types.html#Handle"><span class="hs-identifier hs-type">Handle</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Supply.html#UniqSupply"><span class="hs-identifier hs-type">UniqSupply</span></a></span><span>
</span><span id="line-163"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Data.Stream.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="GHC.Cmm.html#RawCmmGroup"><span class="hs-identifier hs-type">RawCmmGroup</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045227"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-164"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="#local-6989586621681045227"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-165"></span><span id="nativeCodeGen"><span class="annot"><span class="annottext">nativeCodeGen :: forall a.
DynFlags
-&gt; Module
-&gt; ModLocation
-&gt; Handle
-&gt; UniqSupply
-&gt; Stream IO RawCmmGroup a
-&gt; IO a
</span><a href="GHC.CmmToAsm.html#nativeCodeGen"><span class="hs-identifier hs-var hs-var">nativeCodeGen</span></a></span></span><span> </span><span id="local-6989586621681044708"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044708"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681044707"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681044707"><span class="hs-identifier hs-var">this_mod</span></a></span></span><span> </span><span id="local-6989586621681044706"><span class="annot"><span class="annottext">ModLocation
</span><a href="#local-6989586621681044706"><span class="hs-identifier hs-var">modLoc</span></a></span></span><span> </span><span id="local-6989586621681044705"><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621681044705"><span class="hs-identifier hs-var">h</span></a></span></span><span> </span><span id="local-6989586621681044704"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681044704"><span class="hs-identifier hs-var">us</span></a></span></span><span> </span><span id="local-6989586621681044703"><span class="annot"><span class="annottext">Stream IO RawCmmGroup a
</span><a href="#local-6989586621681044703"><span class="hs-identifier hs-var">cmms</span></a></span></span><span>
</span><span id="line-166"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681044702"><span class="annot"><span class="annottext">config :: NCGConfig
</span><a href="#local-6989586621681044702"><span class="hs-identifier hs-var hs-var">config</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; NCGConfig
</span><a href="GHC.CmmToAsm.Monad.html#initConfig"><span class="hs-identifier hs-var">initConfig</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044708"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-167"></span><span>       </span><span id="local-6989586621681044700"><span class="annot"><span class="annottext">platform :: Platform
</span><a href="#local-6989586621681044700"><span class="hs-identifier hs-var hs-var">platform</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NCGConfig -&gt; Platform
</span><a href="GHC.CmmToAsm.Config.html#ncgPlatform"><span class="hs-identifier hs-var hs-var">ncgPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681044702"><span class="hs-identifier hs-var">config</span></a></span><span>
</span><span id="line-168"></span><span>       </span><span id="local-6989586621681045206"><span id="local-6989586621681045207"><span id="local-6989586621681045208"><span class="annot"><a href="#local-6989586621681044698"><span class="hs-identifier hs-type">nCG'</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045208"><span class="hs-identifier hs-type">statics</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045207"><span class="hs-identifier hs-type">instr</span></a></span><span>
</span><span id="line-169"></span><span>               </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045206"><span class="hs-identifier hs-type">jumpDest</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#Instruction"><span class="hs-identifier hs-type">Instruction</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045207"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-170"></span><span>            </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Monad.html#NcgImpl"><span class="hs-identifier hs-type">NcgImpl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045208"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045207"><span class="hs-identifier hs-type">instr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045206"><span class="hs-identifier hs-type">jumpDest</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="#local-6989586621681045227"><span class="hs-identifier hs-type">a</span></a></span></span></span></span><span>
</span><span id="line-171"></span><span>       </span><span id="local-6989586621681044698"><span class="annot"><span class="annottext">nCG' :: forall statics instr jumpDest.
(Outputable statics, Outputable instr, Outputable jumpDest,
 Instruction instr) =&gt;
NcgImpl statics instr jumpDest -&gt; IO a
</span><a href="#local-6989586621681044698"><span class="hs-identifier hs-var hs-var">nCG'</span></a></span></span><span> </span><span id="local-6989586621681044689"><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
</span><a href="#local-6989586621681044689"><span class="hs-identifier hs-var">ncgImpl</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags
-&gt; Module
-&gt; ModLocation
-&gt; NcgImpl statics instr jumpDest
-&gt; Handle
-&gt; UniqSupply
-&gt; Stream IO RawCmmGroup a
-&gt; IO a
forall statics instr jumpDest a.
(Outputable statics, Outputable instr, Outputable jumpDest,
 Instruction instr) =&gt;
DynFlags
-&gt; Module
-&gt; ModLocation
-&gt; NcgImpl statics instr jumpDest
-&gt; Handle
-&gt; UniqSupply
-&gt; Stream IO RawCmmGroup a
-&gt; IO a
</span><a href="GHC.CmmToAsm.html#nativeCodeGen%27"><span class="hs-identifier hs-var">nativeCodeGen'</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044708"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681044707"><span class="hs-identifier hs-var">this_mod</span></a></span><span> </span><span class="annot"><span class="annottext">ModLocation
</span><a href="#local-6989586621681044706"><span class="hs-identifier hs-var">modLoc</span></a></span><span> </span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
</span><a href="#local-6989586621681044689"><span class="hs-identifier hs-var">ncgImpl</span></a></span><span> </span><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621681044705"><span class="hs-identifier hs-var">h</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681044704"><span class="hs-identifier hs-var">us</span></a></span><span> </span><span class="annot"><span class="annottext">Stream IO RawCmmGroup a
</span><a href="#local-6989586621681044703"><span class="hs-identifier hs-var">cmms</span></a></span><span>
</span><span id="line-172"></span><span>   </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Arch
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformArch"><span class="hs-identifier hs-var">platformArch</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681044700"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-173"></span><span>      </span><span class="annot"><span class="annottext">Arch
</span><a href="../../ghc-boot/src/GHC.Platform.html#ArchX86"><span class="hs-identifier hs-var">ArchX86</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">NcgImpl (Alignment, RawCmmStatics) Instr JumpDest -&gt; IO a
forall statics instr jumpDest.
(Outputable statics, Outputable instr, Outputable jumpDest,
 Instruction instr) =&gt;
NcgImpl statics instr jumpDest -&gt; IO a
</span><a href="#local-6989586621681044698"><span class="hs-identifier hs-var">nCG'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NCGConfig -&gt; NcgImpl (Alignment, RawCmmStatics) Instr JumpDest
</span><a href="GHC.CmmToAsm.html#x86NcgImpl"><span class="hs-identifier hs-var">x86NcgImpl</span></a></span><span>    </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681044702"><span class="hs-identifier hs-var">config</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-174"></span><span>      </span><span class="annot"><span class="annottext">Arch
</span><a href="../../ghc-boot/src/GHC.Platform.html#ArchX86_64"><span class="hs-identifier hs-var">ArchX86_64</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">NcgImpl (Alignment, RawCmmStatics) Instr JumpDest -&gt; IO a
forall statics instr jumpDest.
(Outputable statics, Outputable instr, Outputable jumpDest,
 Instruction instr) =&gt;
NcgImpl statics instr jumpDest -&gt; IO a
</span><a href="#local-6989586621681044698"><span class="hs-identifier hs-var">nCG'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NCGConfig -&gt; NcgImpl (Alignment, RawCmmStatics) Instr JumpDest
</span><a href="GHC.CmmToAsm.html#x86_64NcgImpl"><span class="hs-identifier hs-var">x86_64NcgImpl</span></a></span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681044702"><span class="hs-identifier hs-var">config</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-175"></span><span>      </span><span class="annot"><span class="annottext">Arch
</span><a href="../../ghc-boot/src/GHC.Platform.html#ArchPPC"><span class="hs-identifier hs-var">ArchPPC</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">NcgImpl RawCmmStatics Instr JumpDest -&gt; IO a
forall statics instr jumpDest.
(Outputable statics, Outputable instr, Outputable jumpDest,
 Instruction instr) =&gt;
NcgImpl statics instr jumpDest -&gt; IO a
</span><a href="#local-6989586621681044698"><span class="hs-identifier hs-var">nCG'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NCGConfig -&gt; NcgImpl RawCmmStatics Instr JumpDest
</span><a href="GHC.CmmToAsm.html#ppcNcgImpl"><span class="hs-identifier hs-var">ppcNcgImpl</span></a></span><span>    </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681044702"><span class="hs-identifier hs-var">config</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-176"></span><span>      </span><span class="annot"><span class="annottext">Arch
</span><a href="../../ghc-boot/src/GHC.Platform.html#ArchS390X"><span class="hs-identifier hs-var">ArchS390X</span></a></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; IO a
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;nativeCodeGen: No NCG for S390X&quot;</span></span><span>
</span><span id="line-177"></span><span>      </span><span class="annot"><span class="annottext">Arch
</span><a href="../../ghc-boot/src/GHC.Platform.html#ArchSPARC"><span class="hs-identifier hs-var">ArchSPARC</span></a></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">NcgImpl RawCmmStatics Instr JumpDest -&gt; IO a
forall statics instr jumpDest.
(Outputable statics, Outputable instr, Outputable jumpDest,
 Instruction instr) =&gt;
NcgImpl statics instr jumpDest -&gt; IO a
</span><a href="#local-6989586621681044698"><span class="hs-identifier hs-var">nCG'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NCGConfig -&gt; NcgImpl RawCmmStatics Instr JumpDest
</span><a href="GHC.CmmToAsm.html#sparcNcgImpl"><span class="hs-identifier hs-var">sparcNcgImpl</span></a></span><span>  </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681044702"><span class="hs-identifier hs-var">config</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-178"></span><span>      </span><span class="annot"><span class="annottext">Arch
</span><a href="../../ghc-boot/src/GHC.Platform.html#ArchSPARC64"><span class="hs-identifier hs-var">ArchSPARC64</span></a></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; IO a
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;nativeCodeGen: No NCG for SPARC64&quot;</span></span><span>
</span><span id="line-179"></span><span>      </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#ArchARM"><span class="hs-identifier hs-type">ArchARM</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; IO a
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;nativeCodeGen: No NCG for ARM&quot;</span></span><span>
</span><span id="line-180"></span><span>      </span><span class="annot"><span class="annottext">Arch
</span><a href="../../ghc-boot/src/GHC.Platform.html#ArchAArch64"><span class="hs-identifier hs-var">ArchAArch64</span></a></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; IO a
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;nativeCodeGen: No NCG for AArch64&quot;</span></span><span>
</span><span id="line-181"></span><span>      </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#ArchPPC_64"><span class="hs-identifier hs-type">ArchPPC_64</span></a></span><span> </span><span class="annot"><span class="annottext">PPC_64ABI
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">NcgImpl RawCmmStatics Instr JumpDest -&gt; IO a
forall statics instr jumpDest.
(Outputable statics, Outputable instr, Outputable jumpDest,
 Instruction instr) =&gt;
NcgImpl statics instr jumpDest -&gt; IO a
</span><a href="#local-6989586621681044698"><span class="hs-identifier hs-var">nCG'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NCGConfig -&gt; NcgImpl RawCmmStatics Instr JumpDest
</span><a href="GHC.CmmToAsm.html#ppcNcgImpl"><span class="hs-identifier hs-var">ppcNcgImpl</span></a></span><span>    </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681044702"><span class="hs-identifier hs-var">config</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-182"></span><span>      </span><span class="annot"><span class="annottext">Arch
</span><a href="../../ghc-boot/src/GHC.Platform.html#ArchAlpha"><span class="hs-identifier hs-var">ArchAlpha</span></a></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; IO a
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;nativeCodeGen: No NCG for Alpha&quot;</span></span><span>
</span><span id="line-183"></span><span>      </span><span class="annot"><span class="annottext">Arch
</span><a href="../../ghc-boot/src/GHC.Platform.html#ArchMipseb"><span class="hs-identifier hs-var">ArchMipseb</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; IO a
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;nativeCodeGen: No NCG for mipseb&quot;</span></span><span>
</span><span id="line-184"></span><span>      </span><span class="annot"><span class="annottext">Arch
</span><a href="../../ghc-boot/src/GHC.Platform.html#ArchMipsel"><span class="hs-identifier hs-var">ArchMipsel</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; IO a
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;nativeCodeGen: No NCG for mipsel&quot;</span></span><span>
</span><span id="line-185"></span><span>      </span><span class="annot"><span class="annottext">Arch
</span><a href="../../ghc-boot/src/GHC.Platform.html#ArchUnknown"><span class="hs-identifier hs-var">ArchUnknown</span></a></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; IO a
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;nativeCodeGen: No NCG for unknown arch&quot;</span></span><span>
</span><span id="line-186"></span><span>      </span><span class="annot"><span class="annottext">Arch
</span><a href="../../ghc-boot/src/GHC.Platform.html#ArchJavaScript"><span class="hs-identifier hs-var">ArchJavaScript</span></a></span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; IO a
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;nativeCodeGen: No NCG for JavaScript&quot;</span></span><span>
</span><span id="line-187"></span><span>
</span><span id="line-188"></span><span class="annot"><a href="GHC.CmmToAsm.html#x86NcgImpl"><span class="hs-identifier hs-type">x86NcgImpl</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Config.html#NCGConfig"><span class="hs-identifier hs-type">NCGConfig</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Monad.html#NcgImpl"><span class="hs-identifier hs-type">NcgImpl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Basic.html#Alignment"><span class="hs-identifier hs-type">Alignment</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.html#RawCmmStatics"><span class="hs-identifier hs-type">RawCmmStatics</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-189"></span><span>                                  </span><span class="annot"><a href="GHC.CmmToAsm.X86.Instr.html#Instr"><span class="hs-identifier hs-type">X86.Instr.Instr</span></a></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Instr.html#JumpDest"><span class="hs-identifier hs-type">X86.Instr.JumpDest</span></a></span><span>
</span><span id="line-190"></span><span id="x86NcgImpl"><span class="annot"><span class="annottext">x86NcgImpl :: NCGConfig -&gt; NcgImpl (Alignment, RawCmmStatics) Instr JumpDest
</span><a href="GHC.CmmToAsm.html#x86NcgImpl"><span class="hs-identifier hs-var hs-var">x86NcgImpl</span></a></span></span><span> </span><span id="local-6989586621681044668"><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681044668"><span class="hs-identifier hs-var">config</span></a></span></span><span>
</span><span id="line-191"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NCGConfig -&gt; NcgImpl (Alignment, RawCmmStatics) Instr JumpDest
</span><a href="GHC.CmmToAsm.html#x86_64NcgImpl"><span class="hs-identifier hs-var">x86_64NcgImpl</span></a></span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681044668"><span class="hs-identifier hs-var">config</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-192"></span><span>
</span><span id="line-193"></span><span class="annot"><a href="GHC.CmmToAsm.html#x86_64NcgImpl"><span class="hs-identifier hs-type">x86_64NcgImpl</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Config.html#NCGConfig"><span class="hs-identifier hs-type">NCGConfig</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Monad.html#NcgImpl"><span class="hs-identifier hs-type">NcgImpl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Basic.html#Alignment"><span class="hs-identifier hs-type">Alignment</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.html#RawCmmStatics"><span class="hs-identifier hs-type">RawCmmStatics</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-194"></span><span>                                  </span><span class="annot"><a href="GHC.CmmToAsm.X86.Instr.html#Instr"><span class="hs-identifier hs-type">X86.Instr.Instr</span></a></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.X86.Instr.html#JumpDest"><span class="hs-identifier hs-type">X86.Instr.JumpDest</span></a></span><span>
</span><span id="line-195"></span><span id="x86_64NcgImpl"><span class="annot"><span class="annottext">x86_64NcgImpl :: NCGConfig -&gt; NcgImpl (Alignment, RawCmmStatics) Instr JumpDest
</span><a href="GHC.CmmToAsm.html#x86_64NcgImpl"><span class="hs-identifier hs-var hs-var">x86_64NcgImpl</span></a></span></span><span> </span><span id="local-6989586621681044667"><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681044667"><span class="hs-identifier hs-var">config</span></a></span></span><span>
</span><span id="line-196"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NcgImpl :: forall statics instr jumpDest.
NCGConfig
-&gt; (RawCmmDecl -&gt; NatM [NatCmmDecl statics instr])
-&gt; (instr -&gt; Maybe (NatCmmDecl statics instr))
-&gt; (jumpDest -&gt; Maybe BlockId)
-&gt; (instr -&gt; Maybe jumpDest)
-&gt; ((BlockId -&gt; Maybe jumpDest) -&gt; statics -&gt; statics)
-&gt; ((BlockId -&gt; Maybe jumpDest) -&gt; instr -&gt; instr)
-&gt; (NatCmmDecl statics instr -&gt; SDoc)
-&gt; Int
-&gt; [RealReg]
-&gt; ([NatCmmDecl statics instr] -&gt; [NatCmmDecl statics instr])
-&gt; (Int
    -&gt; NatCmmDecl statics instr
    -&gt; UniqSM (NatCmmDecl statics instr, [(BlockId, BlockId)]))
-&gt; (LabelMap RawCmmStatics
    -&gt; [NatBasicBlock instr] -&gt; [NatBasicBlock instr])
-&gt; ([instr] -&gt; [UnwindPoint])
-&gt; (Maybe CFG
    -&gt; LabelMap RawCmmStatics
    -&gt; [NatBasicBlock instr]
    -&gt; [NatBasicBlock instr])
-&gt; NcgImpl statics instr jumpDest
</span><a href="GHC.CmmToAsm.Monad.html#NcgImpl"><span class="hs-identifier hs-type">NcgImpl</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-197"></span><span>        </span><span class="annot"><span class="annottext">ncgConfig :: NCGConfig
</span><a href="GHC.CmmToAsm.Monad.html#ncgConfig"><span class="hs-identifier hs-var">ncgConfig</span></a></span><span>                 </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681044667"><span class="hs-identifier hs-var">config</span></a></span><span>
</span><span id="line-198"></span><span>       </span><span class="hs-special">,</span><span class="annot"><span class="annottext">cmmTopCodeGen :: RawCmmDecl -&gt; NatM [NatCmmDecl (Alignment, RawCmmStatics) Instr]
</span><a href="GHC.CmmToAsm.Monad.html#cmmTopCodeGen"><span class="hs-identifier hs-var">cmmTopCodeGen</span></a></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RawCmmDecl -&gt; NatM [NatCmmDecl (Alignment, RawCmmStatics) Instr]
</span><a href="GHC.CmmToAsm.X86.CodeGen.html#cmmTopCodeGen"><span class="hs-identifier hs-var">X86.CodeGen.cmmTopCodeGen</span></a></span><span>
</span><span id="line-199"></span><span>       </span><span class="hs-special">,</span><span class="annot"><span class="annottext">generateJumpTableForInstr :: Instr -&gt; Maybe (NatCmmDecl (Alignment, RawCmmStatics) Instr)
</span><a href="GHC.CmmToAsm.Monad.html#generateJumpTableForInstr"><span class="hs-identifier hs-var">generateJumpTableForInstr</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NCGConfig
-&gt; Instr -&gt; Maybe (NatCmmDecl (Alignment, RawCmmStatics) Instr)
</span><a href="GHC.CmmToAsm.X86.CodeGen.html#generateJumpTableForInstr"><span class="hs-identifier hs-var">X86.CodeGen.generateJumpTableForInstr</span></a></span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681044667"><span class="hs-identifier hs-var">config</span></a></span><span>
</span><span id="line-200"></span><span>       </span><span class="hs-special">,</span><span class="annot"><span class="annottext">getJumpDestBlockId :: JumpDest -&gt; Maybe BlockId
</span><a href="GHC.CmmToAsm.Monad.html#getJumpDestBlockId"><span class="hs-identifier hs-var">getJumpDestBlockId</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">JumpDest -&gt; Maybe BlockId
</span><a href="GHC.CmmToAsm.X86.Instr.html#getJumpDestBlockId"><span class="hs-identifier hs-var">X86.Instr.getJumpDestBlockId</span></a></span><span>
</span><span id="line-201"></span><span>       </span><span class="hs-special">,</span><span class="annot"><span class="annottext">canShortcut :: Instr -&gt; Maybe JumpDest
</span><a href="GHC.CmmToAsm.Monad.html#canShortcut"><span class="hs-identifier hs-var">canShortcut</span></a></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Instr -&gt; Maybe JumpDest
</span><a href="GHC.CmmToAsm.X86.Instr.html#canShortcut"><span class="hs-identifier hs-var">X86.Instr.canShortcut</span></a></span><span>
</span><span id="line-202"></span><span>       </span><span class="hs-special">,</span><span class="annot"><span class="annottext">shortcutStatics :: (BlockId -&gt; Maybe JumpDest)
-&gt; (Alignment, RawCmmStatics) -&gt; (Alignment, RawCmmStatics)
</span><a href="GHC.CmmToAsm.Monad.html#shortcutStatics"><span class="hs-identifier hs-var">shortcutStatics</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(BlockId -&gt; Maybe JumpDest)
-&gt; (Alignment, RawCmmStatics) -&gt; (Alignment, RawCmmStatics)
</span><a href="GHC.CmmToAsm.X86.Instr.html#shortcutStatics"><span class="hs-identifier hs-var">X86.Instr.shortcutStatics</span></a></span><span>
</span><span id="line-203"></span><span>       </span><span class="hs-special">,</span><span class="annot"><span class="annottext">shortcutJump :: (BlockId -&gt; Maybe JumpDest) -&gt; Instr -&gt; Instr
</span><a href="GHC.CmmToAsm.Monad.html#shortcutJump"><span class="hs-identifier hs-var">shortcutJump</span></a></span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(BlockId -&gt; Maybe JumpDest) -&gt; Instr -&gt; Instr
</span><a href="GHC.CmmToAsm.X86.Instr.html#shortcutJump"><span class="hs-identifier hs-var">X86.Instr.shortcutJump</span></a></span><span>
</span><span id="line-204"></span><span>       </span><span class="hs-special">,</span><span class="annot"><span class="annottext">pprNatCmmDecl :: NatCmmDecl (Alignment, RawCmmStatics) Instr -&gt; SDoc
</span><a href="GHC.CmmToAsm.Monad.html#pprNatCmmDecl"><span class="hs-identifier hs-var">pprNatCmmDecl</span></a></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NCGConfig -&gt; NatCmmDecl (Alignment, RawCmmStatics) Instr -&gt; SDoc
</span><a href="GHC.CmmToAsm.X86.Ppr.html#pprNatCmmDecl"><span class="hs-identifier hs-var">X86.Ppr.pprNatCmmDecl</span></a></span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681044667"><span class="hs-identifier hs-var">config</span></a></span><span>
</span><span id="line-205"></span><span>       </span><span class="hs-special">,</span><span class="annot"><span class="annottext">maxSpillSlots :: Int
</span><a href="GHC.CmmToAsm.Monad.html#maxSpillSlots"><span class="hs-identifier hs-var">maxSpillSlots</span></a></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NCGConfig -&gt; Int
</span><a href="GHC.CmmToAsm.X86.Instr.html#maxSpillSlots"><span class="hs-identifier hs-var">X86.Instr.maxSpillSlots</span></a></span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681044667"><span class="hs-identifier hs-var">config</span></a></span><span>
</span><span id="line-206"></span><span>       </span><span class="hs-special">,</span><span class="annot"><span class="annottext">allocatableRegs :: [RealReg]
</span><a href="GHC.CmmToAsm.Monad.html#allocatableRegs"><span class="hs-identifier hs-var">allocatableRegs</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; [RealReg]
</span><a href="GHC.CmmToAsm.X86.Regs.html#allocatableRegs"><span class="hs-identifier hs-var">X86.Regs.allocatableRegs</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681044646"><span class="hs-identifier hs-var">platform</span></a></span><span>
</span><span id="line-207"></span><span>       </span><span class="hs-special">,</span><span class="annot"><span class="annottext">ncgAllocMoreStack :: Int
-&gt; NatCmmDecl (Alignment, RawCmmStatics) Instr
-&gt; UniqSM
     (NatCmmDecl (Alignment, RawCmmStatics) Instr, [(BlockId, BlockId)])
</span><a href="GHC.CmmToAsm.Monad.html#ncgAllocMoreStack"><span class="hs-identifier hs-var">ncgAllocMoreStack</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform
-&gt; Int
-&gt; NatCmmDecl (Alignment, RawCmmStatics) Instr
-&gt; UniqSM
     (NatCmmDecl (Alignment, RawCmmStatics) Instr, [(BlockId, BlockId)])
forall statics.
Platform
-&gt; Int
-&gt; NatCmmDecl statics Instr
-&gt; UniqSM (NatCmmDecl statics Instr, [(BlockId, BlockId)])
</span><a href="GHC.CmmToAsm.X86.Instr.html#allocMoreStack"><span class="hs-identifier hs-var">X86.Instr.allocMoreStack</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681044646"><span class="hs-identifier hs-var">platform</span></a></span><span>
</span><span id="line-208"></span><span>       </span><span class="hs-special">,</span><span class="annot"><span class="annottext">ncgExpandTop :: [NatCmmDecl (Alignment, RawCmmStatics) Instr]
-&gt; [NatCmmDecl (Alignment, RawCmmStatics) Instr]
</span><a href="GHC.CmmToAsm.Monad.html#ncgExpandTop"><span class="hs-identifier hs-var">ncgExpandTop</span></a></span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[NatCmmDecl (Alignment, RawCmmStatics) Instr]
-&gt; [NatCmmDecl (Alignment, RawCmmStatics) Instr]
forall a. a -&gt; a
</span><a href="../../base/src/GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-209"></span><span>       </span><span class="hs-special">,</span><span class="annot"><span class="annottext">ncgMakeFarBranches :: LabelMap RawCmmStatics
-&gt; [NatBasicBlock Instr] -&gt; [NatBasicBlock Instr]
</span><a href="GHC.CmmToAsm.Monad.html#ncgMakeFarBranches"><span class="hs-identifier hs-var">ncgMakeFarBranches</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">([NatBasicBlock Instr] -&gt; [NatBasicBlock Instr])
-&gt; LabelMap RawCmmStatics
-&gt; [NatBasicBlock Instr]
-&gt; [NatBasicBlock Instr]
forall a b. a -&gt; b -&gt; a
</span><a href="../../base/src/GHC.Base.html#const"><span class="hs-identifier hs-var">const</span></a></span><span> </span><span class="annot"><span class="annottext">[NatBasicBlock Instr] -&gt; [NatBasicBlock Instr]
forall a. a -&gt; a
</span><a href="../../base/src/GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-210"></span><span>       </span><span class="hs-special">,</span><span class="annot"><span class="annottext">extractUnwindPoints :: [Instr] -&gt; [UnwindPoint]
</span><a href="GHC.CmmToAsm.Monad.html#extractUnwindPoints"><span class="hs-identifier hs-var">extractUnwindPoints</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Instr] -&gt; [UnwindPoint]
</span><a href="GHC.CmmToAsm.X86.CodeGen.html#extractUnwindPoints"><span class="hs-identifier hs-var">X86.CodeGen.extractUnwindPoints</span></a></span><span>
</span><span id="line-211"></span><span>       </span><span class="hs-special">,</span><span class="annot"><span class="annottext">invertCondBranches :: Maybe CFG
-&gt; LabelMap RawCmmStatics
-&gt; [NatBasicBlock Instr]
-&gt; [NatBasicBlock Instr]
</span><a href="GHC.CmmToAsm.Monad.html#invertCondBranches"><span class="hs-identifier hs-var">invertCondBranches</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe CFG
-&gt; LabelMap RawCmmStatics
-&gt; [NatBasicBlock Instr]
-&gt; [NatBasicBlock Instr]
forall a.
Maybe CFG
-&gt; LabelMap a -&gt; [NatBasicBlock Instr] -&gt; [NatBasicBlock Instr]
</span><a href="GHC.CmmToAsm.X86.CodeGen.html#invertCondBranches"><span class="hs-identifier hs-var">X86.CodeGen.invertCondBranches</span></a></span><span>
</span><span id="line-212"></span><span>   </span><span class="hs-special">}</span><span>
</span><span id="line-213"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-214"></span><span>      </span><span id="local-6989586621681044646"><span class="annot"><span class="annottext">platform :: Platform
</span><a href="#local-6989586621681044646"><span class="hs-identifier hs-var hs-var">platform</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NCGConfig -&gt; Platform
</span><a href="GHC.CmmToAsm.Config.html#ncgPlatform"><span class="hs-identifier hs-var hs-var">ncgPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681044667"><span class="hs-identifier hs-var">config</span></a></span><span>
</span><span id="line-215"></span><span>
</span><span id="line-216"></span><span class="annot"><a href="GHC.CmmToAsm.html#ppcNcgImpl"><span class="hs-identifier hs-type">ppcNcgImpl</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Config.html#NCGConfig"><span class="hs-identifier hs-type">NCGConfig</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Monad.html#NcgImpl"><span class="hs-identifier hs-type">NcgImpl</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.html#RawCmmStatics"><span class="hs-identifier hs-type">RawCmmStatics</span></a></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.PPC.Instr.html#Instr"><span class="hs-identifier hs-type">PPC.Instr.Instr</span></a></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.PPC.RegInfo.html#JumpDest"><span class="hs-identifier hs-type">PPC.RegInfo.JumpDest</span></a></span><span>
</span><span id="line-217"></span><span id="ppcNcgImpl"><span class="annot"><span class="annottext">ppcNcgImpl :: NCGConfig -&gt; NcgImpl RawCmmStatics Instr JumpDest
</span><a href="GHC.CmmToAsm.html#ppcNcgImpl"><span class="hs-identifier hs-var hs-var">ppcNcgImpl</span></a></span></span><span> </span><span id="local-6989586621681044635"><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681044635"><span class="hs-identifier hs-var">config</span></a></span></span><span>
</span><span id="line-218"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NcgImpl :: forall statics instr jumpDest.
NCGConfig
-&gt; (RawCmmDecl -&gt; NatM [NatCmmDecl statics instr])
-&gt; (instr -&gt; Maybe (NatCmmDecl statics instr))
-&gt; (jumpDest -&gt; Maybe BlockId)
-&gt; (instr -&gt; Maybe jumpDest)
-&gt; ((BlockId -&gt; Maybe jumpDest) -&gt; statics -&gt; statics)
-&gt; ((BlockId -&gt; Maybe jumpDest) -&gt; instr -&gt; instr)
-&gt; (NatCmmDecl statics instr -&gt; SDoc)
-&gt; Int
-&gt; [RealReg]
-&gt; ([NatCmmDecl statics instr] -&gt; [NatCmmDecl statics instr])
-&gt; (Int
    -&gt; NatCmmDecl statics instr
    -&gt; UniqSM (NatCmmDecl statics instr, [(BlockId, BlockId)]))
-&gt; (LabelMap RawCmmStatics
    -&gt; [NatBasicBlock instr] -&gt; [NatBasicBlock instr])
-&gt; ([instr] -&gt; [UnwindPoint])
-&gt; (Maybe CFG
    -&gt; LabelMap RawCmmStatics
    -&gt; [NatBasicBlock instr]
    -&gt; [NatBasicBlock instr])
-&gt; NcgImpl statics instr jumpDest
</span><a href="GHC.CmmToAsm.Monad.html#NcgImpl"><span class="hs-identifier hs-type">NcgImpl</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-219"></span><span>        </span><span class="annot"><span class="annottext">ncgConfig :: NCGConfig
</span><a href="GHC.CmmToAsm.Monad.html#ncgConfig"><span class="hs-identifier hs-var">ncgConfig</span></a></span><span>                 </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681044635"><span class="hs-identifier hs-var">config</span></a></span><span>
</span><span id="line-220"></span><span>       </span><span class="hs-special">,</span><span class="annot"><span class="annottext">cmmTopCodeGen :: RawCmmDecl -&gt; NatM [NatCmmDecl RawCmmStatics Instr]
</span><a href="GHC.CmmToAsm.Monad.html#cmmTopCodeGen"><span class="hs-identifier hs-var">cmmTopCodeGen</span></a></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RawCmmDecl -&gt; NatM [NatCmmDecl RawCmmStatics Instr]
</span><a href="GHC.CmmToAsm.PPC.CodeGen.html#cmmTopCodeGen"><span class="hs-identifier hs-var">PPC.CodeGen.cmmTopCodeGen</span></a></span><span>
</span><span id="line-221"></span><span>       </span><span class="hs-special">,</span><span class="annot"><span class="annottext">generateJumpTableForInstr :: Instr -&gt; Maybe (NatCmmDecl RawCmmStatics Instr)
</span><a href="GHC.CmmToAsm.Monad.html#generateJumpTableForInstr"><span class="hs-identifier hs-var">generateJumpTableForInstr</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NCGConfig -&gt; Instr -&gt; Maybe (NatCmmDecl RawCmmStatics Instr)
</span><a href="GHC.CmmToAsm.PPC.CodeGen.html#generateJumpTableForInstr"><span class="hs-identifier hs-var">PPC.CodeGen.generateJumpTableForInstr</span></a></span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681044635"><span class="hs-identifier hs-var">config</span></a></span><span>
</span><span id="line-222"></span><span>       </span><span class="hs-special">,</span><span class="annot"><span class="annottext">getJumpDestBlockId :: JumpDest -&gt; Maybe BlockId
</span><a href="GHC.CmmToAsm.Monad.html#getJumpDestBlockId"><span class="hs-identifier hs-var">getJumpDestBlockId</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">JumpDest -&gt; Maybe BlockId
</span><a href="GHC.CmmToAsm.PPC.RegInfo.html#getJumpDestBlockId"><span class="hs-identifier hs-var">PPC.RegInfo.getJumpDestBlockId</span></a></span><span>
</span><span id="line-223"></span><span>       </span><span class="hs-special">,</span><span class="annot"><span class="annottext">canShortcut :: Instr -&gt; Maybe JumpDest
</span><a href="GHC.CmmToAsm.Monad.html#canShortcut"><span class="hs-identifier hs-var">canShortcut</span></a></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Instr -&gt; Maybe JumpDest
</span><a href="GHC.CmmToAsm.PPC.RegInfo.html#canShortcut"><span class="hs-identifier hs-var">PPC.RegInfo.canShortcut</span></a></span><span>
</span><span id="line-224"></span><span>       </span><span class="hs-special">,</span><span class="annot"><span class="annottext">shortcutStatics :: (BlockId -&gt; Maybe JumpDest) -&gt; RawCmmStatics -&gt; RawCmmStatics
</span><a href="GHC.CmmToAsm.Monad.html#shortcutStatics"><span class="hs-identifier hs-var">shortcutStatics</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(BlockId -&gt; Maybe JumpDest) -&gt; RawCmmStatics -&gt; RawCmmStatics
</span><a href="GHC.CmmToAsm.PPC.RegInfo.html#shortcutStatics"><span class="hs-identifier hs-var">PPC.RegInfo.shortcutStatics</span></a></span><span>
</span><span id="line-225"></span><span>       </span><span class="hs-special">,</span><span class="annot"><span class="annottext">shortcutJump :: (BlockId -&gt; Maybe JumpDest) -&gt; Instr -&gt; Instr
</span><a href="GHC.CmmToAsm.Monad.html#shortcutJump"><span class="hs-identifier hs-var">shortcutJump</span></a></span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(BlockId -&gt; Maybe JumpDest) -&gt; Instr -&gt; Instr
</span><a href="GHC.CmmToAsm.PPC.RegInfo.html#shortcutJump"><span class="hs-identifier hs-var">PPC.RegInfo.shortcutJump</span></a></span><span>
</span><span id="line-226"></span><span>       </span><span class="hs-special">,</span><span class="annot"><span class="annottext">pprNatCmmDecl :: NatCmmDecl RawCmmStatics Instr -&gt; SDoc
</span><a href="GHC.CmmToAsm.Monad.html#pprNatCmmDecl"><span class="hs-identifier hs-var">pprNatCmmDecl</span></a></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NCGConfig -&gt; NatCmmDecl RawCmmStatics Instr -&gt; SDoc
</span><a href="GHC.CmmToAsm.PPC.Ppr.html#pprNatCmmDecl"><span class="hs-identifier hs-var">PPC.Ppr.pprNatCmmDecl</span></a></span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681044635"><span class="hs-identifier hs-var">config</span></a></span><span>
</span><span id="line-227"></span><span>       </span><span class="hs-special">,</span><span class="annot"><span class="annottext">maxSpillSlots :: Int
</span><a href="GHC.CmmToAsm.Monad.html#maxSpillSlots"><span class="hs-identifier hs-var">maxSpillSlots</span></a></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NCGConfig -&gt; Int
</span><a href="GHC.CmmToAsm.PPC.Instr.html#maxSpillSlots"><span class="hs-identifier hs-var">PPC.Instr.maxSpillSlots</span></a></span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681044635"><span class="hs-identifier hs-var">config</span></a></span><span>
</span><span id="line-228"></span><span>       </span><span class="hs-special">,</span><span class="annot"><span class="annottext">allocatableRegs :: [RealReg]
</span><a href="GHC.CmmToAsm.Monad.html#allocatableRegs"><span class="hs-identifier hs-var">allocatableRegs</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; [RealReg]
</span><a href="GHC.CmmToAsm.PPC.Regs.html#allocatableRegs"><span class="hs-identifier hs-var">PPC.Regs.allocatableRegs</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681044625"><span class="hs-identifier hs-var">platform</span></a></span><span>
</span><span id="line-229"></span><span>       </span><span class="hs-special">,</span><span class="annot"><span class="annottext">ncgAllocMoreStack :: Int
-&gt; NatCmmDecl RawCmmStatics Instr
-&gt; UniqSM (NatCmmDecl RawCmmStatics Instr, [(BlockId, BlockId)])
</span><a href="GHC.CmmToAsm.Monad.html#ncgAllocMoreStack"><span class="hs-identifier hs-var">ncgAllocMoreStack</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform
-&gt; Int
-&gt; NatCmmDecl RawCmmStatics Instr
-&gt; UniqSM (NatCmmDecl RawCmmStatics Instr, [(BlockId, BlockId)])
forall statics.
Platform
-&gt; Int
-&gt; NatCmmDecl statics Instr
-&gt; UniqSM (NatCmmDecl statics Instr, [(BlockId, BlockId)])
</span><a href="GHC.CmmToAsm.PPC.Instr.html#allocMoreStack"><span class="hs-identifier hs-var">PPC.Instr.allocMoreStack</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681044625"><span class="hs-identifier hs-var">platform</span></a></span><span>
</span><span id="line-230"></span><span>       </span><span class="hs-special">,</span><span class="annot"><span class="annottext">ncgExpandTop :: [NatCmmDecl RawCmmStatics Instr]
-&gt; [NatCmmDecl RawCmmStatics Instr]
</span><a href="GHC.CmmToAsm.Monad.html#ncgExpandTop"><span class="hs-identifier hs-var">ncgExpandTop</span></a></span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[NatCmmDecl RawCmmStatics Instr]
-&gt; [NatCmmDecl RawCmmStatics Instr]
forall a. a -&gt; a
</span><a href="../../base/src/GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-231"></span><span>       </span><span class="hs-special">,</span><span class="annot"><span class="annottext">ncgMakeFarBranches :: LabelMap RawCmmStatics
-&gt; [NatBasicBlock Instr] -&gt; [NatBasicBlock Instr]
</span><a href="GHC.CmmToAsm.Monad.html#ncgMakeFarBranches"><span class="hs-identifier hs-var">ncgMakeFarBranches</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LabelMap RawCmmStatics
-&gt; [NatBasicBlock Instr] -&gt; [NatBasicBlock Instr]
</span><a href="GHC.CmmToAsm.PPC.Instr.html#makeFarBranches"><span class="hs-identifier hs-var">PPC.Instr.makeFarBranches</span></a></span><span>
</span><span id="line-232"></span><span>       </span><span class="hs-special">,</span><span class="annot"><span class="annottext">extractUnwindPoints :: [Instr] -&gt; [UnwindPoint]
</span><a href="GHC.CmmToAsm.Monad.html#extractUnwindPoints"><span class="hs-identifier hs-var">extractUnwindPoints</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[UnwindPoint] -&gt; [Instr] -&gt; [UnwindPoint]
forall a b. a -&gt; b -&gt; a
</span><a href="../../base/src/GHC.Base.html#const"><span class="hs-identifier hs-var">const</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-233"></span><span>       </span><span class="hs-special">,</span><span class="annot"><span class="annottext">invertCondBranches :: Maybe CFG
-&gt; LabelMap RawCmmStatics
-&gt; [NatBasicBlock Instr]
-&gt; [NatBasicBlock Instr]
</span><a href="GHC.CmmToAsm.Monad.html#invertCondBranches"><span class="hs-identifier hs-var">invertCondBranches</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="hs-glyph">\</span><span class="annot"><span class="annottext">Maybe CFG
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">LabelMap RawCmmStatics
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[NatBasicBlock Instr] -&gt; [NatBasicBlock Instr]
forall a. a -&gt; a
</span><a href="../../base/src/GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-234"></span><span>   </span><span class="hs-special">}</span><span>
</span><span id="line-235"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-236"></span><span>      </span><span id="local-6989586621681044625"><span class="annot"><span class="annottext">platform :: Platform
</span><a href="#local-6989586621681044625"><span class="hs-identifier hs-var hs-var">platform</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NCGConfig -&gt; Platform
</span><a href="GHC.CmmToAsm.Config.html#ncgPlatform"><span class="hs-identifier hs-var hs-var">ncgPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681044635"><span class="hs-identifier hs-var">config</span></a></span><span>
</span><span id="line-237"></span><span>
</span><span id="line-238"></span><span class="annot"><a href="GHC.CmmToAsm.html#sparcNcgImpl"><span class="hs-identifier hs-type">sparcNcgImpl</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Config.html#NCGConfig"><span class="hs-identifier hs-type">NCGConfig</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Monad.html#NcgImpl"><span class="hs-identifier hs-type">NcgImpl</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.html#RawCmmStatics"><span class="hs-identifier hs-type">RawCmmStatics</span></a></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.SPARC.Instr.html#Instr"><span class="hs-identifier hs-type">SPARC.Instr.Instr</span></a></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.SPARC.ShortcutJump.html#JumpDest"><span class="hs-identifier hs-type">SPARC.ShortcutJump.JumpDest</span></a></span><span>
</span><span id="line-239"></span><span id="sparcNcgImpl"><span class="annot"><span class="annottext">sparcNcgImpl :: NCGConfig -&gt; NcgImpl RawCmmStatics Instr JumpDest
</span><a href="GHC.CmmToAsm.html#sparcNcgImpl"><span class="hs-identifier hs-var hs-var">sparcNcgImpl</span></a></span></span><span> </span><span id="local-6989586621681044622"><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681044622"><span class="hs-identifier hs-var">config</span></a></span></span><span>
</span><span id="line-240"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NcgImpl :: forall statics instr jumpDest.
NCGConfig
-&gt; (RawCmmDecl -&gt; NatM [NatCmmDecl statics instr])
-&gt; (instr -&gt; Maybe (NatCmmDecl statics instr))
-&gt; (jumpDest -&gt; Maybe BlockId)
-&gt; (instr -&gt; Maybe jumpDest)
-&gt; ((BlockId -&gt; Maybe jumpDest) -&gt; statics -&gt; statics)
-&gt; ((BlockId -&gt; Maybe jumpDest) -&gt; instr -&gt; instr)
-&gt; (NatCmmDecl statics instr -&gt; SDoc)
-&gt; Int
-&gt; [RealReg]
-&gt; ([NatCmmDecl statics instr] -&gt; [NatCmmDecl statics instr])
-&gt; (Int
    -&gt; NatCmmDecl statics instr
    -&gt; UniqSM (NatCmmDecl statics instr, [(BlockId, BlockId)]))
-&gt; (LabelMap RawCmmStatics
    -&gt; [NatBasicBlock instr] -&gt; [NatBasicBlock instr])
-&gt; ([instr] -&gt; [UnwindPoint])
-&gt; (Maybe CFG
    -&gt; LabelMap RawCmmStatics
    -&gt; [NatBasicBlock instr]
    -&gt; [NatBasicBlock instr])
-&gt; NcgImpl statics instr jumpDest
</span><a href="GHC.CmmToAsm.Monad.html#NcgImpl"><span class="hs-identifier hs-type">NcgImpl</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-241"></span><span>        </span><span class="annot"><span class="annottext">ncgConfig :: NCGConfig
</span><a href="GHC.CmmToAsm.Monad.html#ncgConfig"><span class="hs-identifier hs-var">ncgConfig</span></a></span><span>                 </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681044622"><span class="hs-identifier hs-var">config</span></a></span><span>
</span><span id="line-242"></span><span>       </span><span class="hs-special">,</span><span class="annot"><span class="annottext">cmmTopCodeGen :: RawCmmDecl -&gt; NatM [NatCmmDecl RawCmmStatics Instr]
</span><a href="GHC.CmmToAsm.Monad.html#cmmTopCodeGen"><span class="hs-identifier hs-var">cmmTopCodeGen</span></a></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RawCmmDecl -&gt; NatM [NatCmmDecl RawCmmStatics Instr]
</span><a href="GHC.CmmToAsm.SPARC.CodeGen.html#cmmTopCodeGen"><span class="hs-identifier hs-var">SPARC.CodeGen.cmmTopCodeGen</span></a></span><span>
</span><span id="line-243"></span><span>       </span><span class="hs-special">,</span><span class="annot"><span class="annottext">generateJumpTableForInstr :: Instr -&gt; Maybe (NatCmmDecl RawCmmStatics Instr)
</span><a href="GHC.CmmToAsm.Monad.html#generateJumpTableForInstr"><span class="hs-identifier hs-var">generateJumpTableForInstr</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Instr -&gt; Maybe (NatCmmDecl RawCmmStatics Instr)
</span><a href="GHC.CmmToAsm.SPARC.CodeGen.html#generateJumpTableForInstr"><span class="hs-identifier hs-var">SPARC.CodeGen.generateJumpTableForInstr</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681044619"><span class="hs-identifier hs-var">platform</span></a></span><span>
</span><span id="line-244"></span><span>       </span><span class="hs-special">,</span><span class="annot"><span class="annottext">getJumpDestBlockId :: JumpDest -&gt; Maybe BlockId
</span><a href="GHC.CmmToAsm.Monad.html#getJumpDestBlockId"><span class="hs-identifier hs-var">getJumpDestBlockId</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">JumpDest -&gt; Maybe BlockId
</span><a href="GHC.CmmToAsm.SPARC.ShortcutJump.html#getJumpDestBlockId"><span class="hs-identifier hs-var">SPARC.ShortcutJump.getJumpDestBlockId</span></a></span><span>
</span><span id="line-245"></span><span>       </span><span class="hs-special">,</span><span class="annot"><span class="annottext">canShortcut :: Instr -&gt; Maybe JumpDest
</span><a href="GHC.CmmToAsm.Monad.html#canShortcut"><span class="hs-identifier hs-var">canShortcut</span></a></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Instr -&gt; Maybe JumpDest
</span><a href="GHC.CmmToAsm.SPARC.ShortcutJump.html#canShortcut"><span class="hs-identifier hs-var">SPARC.ShortcutJump.canShortcut</span></a></span><span>
</span><span id="line-246"></span><span>       </span><span class="hs-special">,</span><span class="annot"><span class="annottext">shortcutStatics :: (BlockId -&gt; Maybe JumpDest) -&gt; RawCmmStatics -&gt; RawCmmStatics
</span><a href="GHC.CmmToAsm.Monad.html#shortcutStatics"><span class="hs-identifier hs-var">shortcutStatics</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(BlockId -&gt; Maybe JumpDest) -&gt; RawCmmStatics -&gt; RawCmmStatics
</span><a href="GHC.CmmToAsm.SPARC.ShortcutJump.html#shortcutStatics"><span class="hs-identifier hs-var">SPARC.ShortcutJump.shortcutStatics</span></a></span><span>
</span><span id="line-247"></span><span>       </span><span class="hs-special">,</span><span class="annot"><span class="annottext">shortcutJump :: (BlockId -&gt; Maybe JumpDest) -&gt; Instr -&gt; Instr
</span><a href="GHC.CmmToAsm.Monad.html#shortcutJump"><span class="hs-identifier hs-var">shortcutJump</span></a></span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(BlockId -&gt; Maybe JumpDest) -&gt; Instr -&gt; Instr
</span><a href="GHC.CmmToAsm.SPARC.ShortcutJump.html#shortcutJump"><span class="hs-identifier hs-var">SPARC.ShortcutJump.shortcutJump</span></a></span><span>
</span><span id="line-248"></span><span>       </span><span class="hs-special">,</span><span class="annot"><span class="annottext">pprNatCmmDecl :: NatCmmDecl RawCmmStatics Instr -&gt; SDoc
</span><a href="GHC.CmmToAsm.Monad.html#pprNatCmmDecl"><span class="hs-identifier hs-var">pprNatCmmDecl</span></a></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NCGConfig -&gt; NatCmmDecl RawCmmStatics Instr -&gt; SDoc
</span><a href="GHC.CmmToAsm.SPARC.Ppr.html#pprNatCmmDecl"><span class="hs-identifier hs-var">SPARC.Ppr.pprNatCmmDecl</span></a></span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681044622"><span class="hs-identifier hs-var">config</span></a></span><span>
</span><span id="line-249"></span><span>       </span><span class="hs-special">,</span><span class="annot"><span class="annottext">maxSpillSlots :: Int
</span><a href="GHC.CmmToAsm.Monad.html#maxSpillSlots"><span class="hs-identifier hs-var">maxSpillSlots</span></a></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NCGConfig -&gt; Int
</span><a href="GHC.CmmToAsm.SPARC.Stack.html#maxSpillSlots"><span class="hs-identifier hs-var">SPARC.Instr.maxSpillSlots</span></a></span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681044622"><span class="hs-identifier hs-var">config</span></a></span><span>
</span><span id="line-250"></span><span>       </span><span class="hs-special">,</span><span class="annot"><span class="annottext">allocatableRegs :: [RealReg]
</span><a href="GHC.CmmToAsm.Monad.html#allocatableRegs"><span class="hs-identifier hs-var">allocatableRegs</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[RealReg]
</span><a href="GHC.CmmToAsm.SPARC.Regs.html#allocatableRegs"><span class="hs-identifier hs-var">SPARC.Regs.allocatableRegs</span></a></span><span>
</span><span id="line-251"></span><span>       </span><span class="hs-special">,</span><span class="annot"><span class="annottext">ncgAllocMoreStack :: Int
-&gt; NatCmmDecl RawCmmStatics Instr
-&gt; UniqSM (NatCmmDecl RawCmmStatics Instr, [(BlockId, BlockId)])
</span><a href="GHC.CmmToAsm.Monad.html#ncgAllocMoreStack"><span class="hs-identifier hs-var">ncgAllocMoreStack</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
-&gt; NatCmmDecl RawCmmStatics Instr
-&gt; UniqSM (NatCmmDecl RawCmmStatics Instr, [(BlockId, BlockId)])
forall statics instr.
Int
-&gt; NatCmmDecl statics instr
-&gt; UniqSM (NatCmmDecl statics instr, [(BlockId, BlockId)])
</span><a href="GHC.CmmToAsm.html#noAllocMoreStack"><span class="hs-identifier hs-var">noAllocMoreStack</span></a></span><span>
</span><span id="line-252"></span><span>       </span><span class="hs-special">,</span><span class="annot"><span class="annottext">ncgExpandTop :: [NatCmmDecl RawCmmStatics Instr]
-&gt; [NatCmmDecl RawCmmStatics Instr]
</span><a href="GHC.CmmToAsm.Monad.html#ncgExpandTop"><span class="hs-identifier hs-var">ncgExpandTop</span></a></span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(NatCmmDecl RawCmmStatics Instr -&gt; NatCmmDecl RawCmmStatics Instr)
-&gt; [NatCmmDecl RawCmmStatics Instr]
-&gt; [NatCmmDecl RawCmmStatics Instr]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">NatCmmDecl RawCmmStatics Instr -&gt; NatCmmDecl RawCmmStatics Instr
</span><a href="GHC.CmmToAsm.SPARC.CodeGen.Expand.html#expandTop"><span class="hs-identifier hs-var">SPARC.CodeGen.Expand.expandTop</span></a></span><span>
</span><span id="line-253"></span><span>       </span><span class="hs-special">,</span><span class="annot"><span class="annottext">ncgMakeFarBranches :: LabelMap RawCmmStatics
-&gt; [NatBasicBlock Instr] -&gt; [NatBasicBlock Instr]
</span><a href="GHC.CmmToAsm.Monad.html#ncgMakeFarBranches"><span class="hs-identifier hs-var">ncgMakeFarBranches</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">([NatBasicBlock Instr] -&gt; [NatBasicBlock Instr])
-&gt; LabelMap RawCmmStatics
-&gt; [NatBasicBlock Instr]
-&gt; [NatBasicBlock Instr]
forall a b. a -&gt; b -&gt; a
</span><a href="../../base/src/GHC.Base.html#const"><span class="hs-identifier hs-var">const</span></a></span><span> </span><span class="annot"><span class="annottext">[NatBasicBlock Instr] -&gt; [NatBasicBlock Instr]
forall a. a -&gt; a
</span><a href="../../base/src/GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-254"></span><span>       </span><span class="hs-special">,</span><span class="annot"><span class="annottext">extractUnwindPoints :: [Instr] -&gt; [UnwindPoint]
</span><a href="GHC.CmmToAsm.Monad.html#extractUnwindPoints"><span class="hs-identifier hs-var">extractUnwindPoints</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[UnwindPoint] -&gt; [Instr] -&gt; [UnwindPoint]
forall a b. a -&gt; b -&gt; a
</span><a href="../../base/src/GHC.Base.html#const"><span class="hs-identifier hs-var">const</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-255"></span><span>       </span><span class="hs-special">,</span><span class="annot"><span class="annottext">invertCondBranches :: Maybe CFG
-&gt; LabelMap RawCmmStatics
-&gt; [NatBasicBlock Instr]
-&gt; [NatBasicBlock Instr]
</span><a href="GHC.CmmToAsm.Monad.html#invertCondBranches"><span class="hs-identifier hs-var">invertCondBranches</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="hs-glyph">\</span><span class="annot"><span class="annottext">Maybe CFG
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">LabelMap RawCmmStatics
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[NatBasicBlock Instr] -&gt; [NatBasicBlock Instr]
forall a. a -&gt; a
</span><a href="../../base/src/GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-256"></span><span>   </span><span class="hs-special">}</span><span>
</span><span id="line-257"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-258"></span><span>      </span><span id="local-6989586621681044619"><span class="annot"><span class="annottext">platform :: Platform
</span><a href="#local-6989586621681044619"><span class="hs-identifier hs-var hs-var">platform</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NCGConfig -&gt; Platform
</span><a href="GHC.CmmToAsm.Config.html#ncgPlatform"><span class="hs-identifier hs-var hs-var">ncgPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681044622"><span class="hs-identifier hs-var">config</span></a></span><span>
</span><span id="line-259"></span><span>
</span><span id="line-260"></span><span class="hs-comment">--</span><span>
</span><span id="line-261"></span><span class="hs-comment">-- Allocating more stack space for spilling is currently only</span><span>
</span><span id="line-262"></span><span class="hs-comment">-- supported for the linear register allocator on x86/x86_64, the rest</span><span>
</span><span id="line-263"></span><span class="hs-comment">-- default to the panic below.  To support allocating extra stack on</span><span>
</span><span id="line-264"></span><span class="hs-comment">-- more platforms provide a definition of ncgAllocMoreStack.</span><span>
</span><span id="line-265"></span><span class="hs-comment">--</span><span>
</span><span id="line-266"></span><span id="local-6989586621681045174"><span id="local-6989586621681045175"><span class="annot"><a href="GHC.CmmToAsm.html#noAllocMoreStack"><span class="hs-identifier hs-type">noAllocMoreStack</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#NatCmmDecl"><span class="hs-identifier hs-type">NatCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045175"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045174"><span class="hs-identifier hs-type">instr</span></a></span><span>
</span><span id="line-267"></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Supply.html#UniqSM"><span class="hs-identifier hs-type">UniqSM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#NatCmmDecl"><span class="hs-identifier hs-type">NatCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045175"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045174"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.BlockId.html#BlockId"><span class="hs-identifier hs-type">BlockId</span></a></span><span class="hs-special">,</span><span class="annot"><a href="GHC.Cmm.BlockId.html#BlockId"><span class="hs-identifier hs-type">BlockId</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span class="hs-special">)</span></span></span><span>
</span><span id="line-268"></span><span id="noAllocMoreStack"><span class="annot"><span class="annottext">noAllocMoreStack :: forall statics instr.
Int
-&gt; NatCmmDecl statics instr
-&gt; UniqSM (NatCmmDecl statics instr, [(BlockId, BlockId)])
</span><a href="GHC.CmmToAsm.html#noAllocMoreStack"><span class="hs-identifier hs-var hs-var">noAllocMoreStack</span></a></span></span><span> </span><span id="local-6989586621681044607"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681044607"><span class="hs-identifier hs-var">amount</span></a></span></span><span> </span><span class="annot"><span class="annottext">NatCmmDecl statics instr
</span><span class="hs-identifier">_</span></span><span>
</span><span id="line-269"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; UniqSM (NatCmmDecl statics instr, [(BlockId, BlockId)])
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; UniqSM (NatCmmDecl statics instr, [(BlockId, BlockId)]))
-&gt; String
-&gt; UniqSM (NatCmmDecl statics instr, [(BlockId, BlockId)])
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>   </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Register allocator: out of stack slots (need &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681044607"><span class="hs-identifier hs-var">amount</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;)\n&quot;</span></span><span>
</span><span id="line-270"></span><span>        </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>  </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;   If you are trying to compile SHA1.hs from the crypto library then this\n&quot;</span></span><span>
</span><span id="line-271"></span><span>        </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>  </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;   is a known limitation in the linear allocator.\n&quot;</span></span><span>
</span><span id="line-272"></span><span>        </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>  </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;\n&quot;</span></span><span>
</span><span id="line-273"></span><span>        </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>  </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;   Try enabling the graph colouring allocator with -fregs-graph instead.&quot;</span></span><span>
</span><span id="line-274"></span><span>        </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>  </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;   You can still file a bug report if you like.\n&quot;</span></span><span>
</span><span id="line-275"></span><span>
</span><span id="line-276"></span><span>
</span><span id="line-277"></span><span class="hs-comment">-- | Data accumulated during code generation. Mostly about statistics,</span><span>
</span><span id="line-278"></span><span class="hs-comment">-- but also collects debug data for DWARF generation.</span><span>
</span><span id="line-279"></span><span class="hs-keyword">data</span><span> </span><span id="NativeGenAcc"><span class="annot"><a href="GHC.CmmToAsm.html#NativeGenAcc"><span class="hs-identifier hs-var">NativeGenAcc</span></a></span></span><span> </span><span id="local-6989586621681045164"><span class="annot"><a href="#local-6989586621681045164"><span class="hs-identifier hs-type">statics</span></a></span></span><span> </span><span id="local-6989586621681045163"><span class="annot"><a href="#local-6989586621681045163"><span class="hs-identifier hs-type">instr</span></a></span></span><span>
</span><span id="line-280"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="NGS"><span class="annot"><a href="GHC.CmmToAsm.html#NGS"><span class="hs-identifier hs-var">NGS</span></a></span></span><span> </span><span class="hs-special">{</span><span> </span><span id="ngs_imports"><span class="annot"><span class="annottext">forall statics instr. NativeGenAcc statics instr -&gt; [[CLabel]]
</span><a href="GHC.CmmToAsm.html#ngs_imports"><span class="hs-identifier hs-var hs-var">ngs_imports</span></a></span></span><span>     </span><span class="hs-glyph">::</span><span> </span><span class="hs-glyph">!</span><span class="hs-special">[</span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.CLabel.html#CLabel"><span class="hs-identifier hs-type">CLabel</span></a></span><span class="hs-special">]</span><span class="hs-special">]</span><span>
</span><span id="line-281"></span><span>        </span><span class="hs-special">,</span><span> </span><span id="ngs_natives"><span class="annot"><span class="annottext">forall statics instr.
NativeGenAcc statics instr -&gt; [[NatCmmDecl statics instr]]
</span><a href="GHC.CmmToAsm.html#ngs_natives"><span class="hs-identifier hs-var hs-var">ngs_natives</span></a></span></span><span>     </span><span class="hs-glyph">::</span><span> </span><span class="hs-glyph">!</span><span class="hs-special">[</span><span class="hs-special">[</span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#NatCmmDecl"><span class="hs-identifier hs-type">NatCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045164"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045163"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">]</span><span class="hs-special">]</span><span>
</span><span id="line-282"></span><span>             </span><span class="hs-comment">-- ^ Native code generated, for statistics. This might</span><span>
</span><span id="line-283"></span><span>             </span><span class="hs-comment">-- hold a lot of data, so it is important to clear this</span><span>
</span><span id="line-284"></span><span>             </span><span class="hs-comment">-- field as early as possible if it isn't actually</span><span>
</span><span id="line-285"></span><span>             </span><span class="hs-comment">-- required.</span><span>
</span><span id="line-286"></span><span>        </span><span class="hs-special">,</span><span> </span><span id="ngs_colorStats"><span class="annot"><span class="annottext">forall statics instr.
NativeGenAcc statics instr -&gt; [[RegAllocStats statics instr]]
</span><a href="GHC.CmmToAsm.html#ngs_colorStats"><span class="hs-identifier hs-var hs-var">ngs_colorStats</span></a></span></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="hs-glyph">!</span><span class="hs-special">[</span><span class="hs-special">[</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#RegAllocStats"><span class="hs-identifier hs-type">Color.RegAllocStats</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045164"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045163"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">]</span><span class="hs-special">]</span><span>
</span><span id="line-287"></span><span>        </span><span class="hs-special">,</span><span> </span><span id="ngs_linearStats"><span class="annot"><span class="annottext">forall statics instr.
NativeGenAcc statics instr -&gt; [[RegAllocStats]]
</span><a href="GHC.CmmToAsm.html#ngs_linearStats"><span class="hs-identifier hs-var hs-var">ngs_linearStats</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-glyph">!</span><span class="hs-special">[</span><span class="hs-special">[</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.Base.html#RegAllocStats"><span class="hs-identifier hs-type">Linear.RegAllocStats</span></a></span><span class="hs-special">]</span><span class="hs-special">]</span><span>
</span><span id="line-288"></span><span>        </span><span class="hs-special">,</span><span> </span><span id="ngs_labels"><span class="annot"><span class="annottext">forall statics instr. NativeGenAcc statics instr -&gt; [BlockId]
</span><a href="GHC.CmmToAsm.html#ngs_labels"><span class="hs-identifier hs-var hs-var">ngs_labels</span></a></span></span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="hs-glyph">!</span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#Label"><span class="hs-identifier hs-type">Label</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-289"></span><span>        </span><span class="hs-special">,</span><span> </span><span id="ngs_debug"><span class="annot"><span class="annottext">forall statics instr. NativeGenAcc statics instr -&gt; [DebugBlock]
</span><a href="GHC.CmmToAsm.html#ngs_debug"><span class="hs-identifier hs-var hs-var">ngs_debug</span></a></span></span><span>       </span><span class="hs-glyph">::</span><span> </span><span class="hs-glyph">!</span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#DebugBlock"><span class="hs-identifier hs-type">DebugBlock</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-290"></span><span>        </span><span class="hs-special">,</span><span> </span><span id="ngs_dwarfFiles"><span class="annot"><span class="annottext">forall statics instr. NativeGenAcc statics instr -&gt; DwarfFiles
</span><a href="GHC.CmmToAsm.html#ngs_dwarfFiles"><span class="hs-identifier hs-var hs-var">ngs_dwarfFiles</span></a></span></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.CmmToAsm.Monad.html#DwarfFiles"><span class="hs-identifier hs-type">DwarfFiles</span></a></span><span>
</span><span id="line-291"></span><span>        </span><span class="hs-special">,</span><span> </span><span id="ngs_unwinds"><span class="annot"><span class="annottext">forall statics instr.
NativeGenAcc statics instr -&gt; LabelMap [UnwindPoint]
</span><a href="GHC.CmmToAsm.html#ngs_unwinds"><span class="hs-identifier hs-var hs-var">ngs_unwinds</span></a></span></span><span>     </span><span class="hs-glyph">::</span><span> </span><span class="hs-glyph">!</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#LabelMap"><span class="hs-identifier hs-type">LabelMap</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UnwindPoint"><span class="hs-identifier hs-type">UnwindPoint</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-292"></span><span>             </span><span class="hs-comment">-- ^ see Note [Unwinding information in the NCG]</span><span>
</span><span id="line-293"></span><span>             </span><span class="hs-comment">-- and Note [What is this unwinding business?] in &quot;GHC.Cmm.DebugBlock&quot;.</span><span>
</span><span id="line-294"></span><span>        </span><span class="hs-special">}</span><span>
</span><span id="line-295"></span><span>
</span><span id="line-296"></span><span class="hs-comment">{-
Note [Unwinding information in the NCG]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Unwind information is a type of metadata which allows a debugging tool
to reconstruct the values of machine registers at the time a procedure was
entered. For the most part, the production of unwind information is handled by
the Cmm stage, where it is represented by CmmUnwind nodes.

Unfortunately, the Cmm stage doesn't know everything necessary to produce
accurate unwinding information. For instance, the x86-64 calling convention
requires that the stack pointer be aligned to 16 bytes, which in turn means that
GHC must sometimes add padding to $sp prior to performing a foreign call. When
this happens unwind information must be updated accordingly.
For this reason, we make the NCG backends responsible for producing
unwinding tables (with the extractUnwindPoints function in NcgImpl).

We accumulate the produced unwind tables over CmmGroups in the ngs_unwinds
field of NativeGenAcc. This is a label map which contains an entry for each
procedure, containing a list of unwinding points (e.g. a label and an associated
unwinding table).

See also Note [What is this unwinding business?] in &quot;GHC.Cmm.DebugBlock&quot;.
-}</span><span>
</span><span id="line-320"></span><span>
</span><span id="line-321"></span><span id="local-6989586621681045198"><span id="local-6989586621681045199"><span id="local-6989586621681045200"><span id="local-6989586621681045201"><span class="annot"><a href="GHC.CmmToAsm.html#nativeCodeGen%27"><span class="hs-identifier hs-type">nativeCodeGen'</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045201"><span class="hs-identifier hs-type">statics</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045200"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">,</span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045199"><span class="hs-identifier hs-type">jumpDest</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-322"></span><span>                   </span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#Instruction"><span class="hs-identifier hs-type">Instruction</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045200"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-323"></span><span>               </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span>
</span><span id="line-324"></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Module.Location.html#ModLocation"><span class="hs-identifier hs-type">ModLocation</span></a></span><span>
</span><span id="line-325"></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Monad.html#NcgImpl"><span class="hs-identifier hs-type">NcgImpl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045201"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045200"><span class="hs-identifier hs-type">instr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045199"><span class="hs-identifier hs-type">jumpDest</span></a></span><span>
</span><span id="line-326"></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.Handle.Types.html#Handle"><span class="hs-identifier hs-type">Handle</span></a></span><span>
</span><span id="line-327"></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Supply.html#UniqSupply"><span class="hs-identifier hs-type">UniqSupply</span></a></span><span>
</span><span id="line-328"></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Data.Stream.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="GHC.Cmm.html#RawCmmGroup"><span class="hs-identifier hs-type">RawCmmGroup</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045198"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-329"></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="#local-6989586621681045198"><span class="hs-identifier hs-type">a</span></a></span></span></span></span></span><span>
</span><span id="line-330"></span><span id="nativeCodeGen%27"><span class="annot"><span class="annottext">nativeCodeGen' :: forall statics instr jumpDest a.
(Outputable statics, Outputable instr, Outputable jumpDest,
 Instruction instr) =&gt;
DynFlags
-&gt; Module
-&gt; ModLocation
-&gt; NcgImpl statics instr jumpDest
-&gt; Handle
-&gt; UniqSupply
-&gt; Stream IO RawCmmGroup a
-&gt; IO a
</span><a href="GHC.CmmToAsm.html#nativeCodeGen%27"><span class="hs-identifier hs-var hs-var">nativeCodeGen'</span></a></span></span><span> </span><span id="local-6989586621681044582"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044582"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681044581"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681044581"><span class="hs-identifier hs-var">this_mod</span></a></span></span><span> </span><span id="local-6989586621681044580"><span class="annot"><span class="annottext">ModLocation
</span><a href="#local-6989586621681044580"><span class="hs-identifier hs-var">modLoc</span></a></span></span><span> </span><span id="local-6989586621681044579"><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
</span><a href="#local-6989586621681044579"><span class="hs-identifier hs-var">ncgImpl</span></a></span></span><span> </span><span id="local-6989586621681044578"><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621681044578"><span class="hs-identifier hs-var">h</span></a></span></span><span> </span><span id="local-6989586621681044577"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681044577"><span class="hs-identifier hs-var">us</span></a></span></span><span> </span><span id="local-6989586621681044576"><span class="annot"><span class="annottext">Stream IO RawCmmGroup a
</span><a href="#local-6989586621681044576"><span class="hs-identifier hs-var">cmms</span></a></span></span><span>
</span><span id="line-331"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-332"></span><span>        </span><span class="hs-comment">-- BufHandle is a performance hack.  We could hide it inside</span><span>
</span><span id="line-333"></span><span>        </span><span class="hs-comment">-- Pretty if it weren't for the fact that we do lots of little</span><span>
</span><span id="line-334"></span><span>        </span><span class="hs-comment">-- printDocs here (in order to do codegen in constant space).</span><span>
</span><span id="line-335"></span><span>        </span><span id="local-6989586621681044575"><span class="annot"><span class="annottext">BufHandle
</span><a href="#local-6989586621681044575"><span class="hs-identifier hs-var">bufh</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Handle -&gt; IO BufHandle
</span><a href="GHC.Utils.BufHandle.html#newBufHandle"><span class="hs-identifier hs-var">newBufHandle</span></a></span><span> </span><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621681044578"><span class="hs-identifier hs-var">h</span></a></span><span>
</span><span id="line-336"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681044571"><span class="annot"><span class="annottext">ngs0 :: NativeGenAcc statics instr
</span><a href="#local-6989586621681044571"><span class="hs-identifier hs-var hs-var">ngs0</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[[CLabel]]
-&gt; [[NatCmmDecl statics instr]]
-&gt; [[RegAllocStats statics instr]]
-&gt; [[RegAllocStats]]
-&gt; [BlockId]
-&gt; [DebugBlock]
-&gt; DwarfFiles
-&gt; LabelMap [UnwindPoint]
-&gt; NativeGenAcc statics instr
forall statics instr.
[[CLabel]]
-&gt; [[NatCmmDecl statics instr]]
-&gt; [[RegAllocStats statics instr]]
-&gt; [[RegAllocStats]]
-&gt; [BlockId]
-&gt; [DebugBlock]
-&gt; DwarfFiles
-&gt; LabelMap [UnwindPoint]
-&gt; NativeGenAcc statics instr
</span><a href="GHC.CmmToAsm.html#NGS"><span class="hs-identifier hs-var">NGS</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">DwarfFiles
forall key elt. UniqFM key elt
</span><a href="GHC.Types.Unique.FM.html#emptyUFM"><span class="hs-identifier hs-var">emptyUFM</span></a></span><span> </span><span class="annot"><span class="annottext">LabelMap [UnwindPoint]
forall (map :: * -&gt; *) a. IsMap map =&gt; map a
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapEmpty"><span class="hs-identifier hs-var">mapEmpty</span></a></span><span>
</span><span id="line-337"></span><span>        </span><span class="hs-special">(</span><span id="local-6989586621681044568"><span class="annot"><span class="annottext">NativeGenAcc statics instr
</span><a href="#local-6989586621681044568"><span class="hs-identifier hs-var">ngs</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681044567"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681044567"><span class="hs-identifier hs-var">us'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681044566"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681044566"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">DynFlags
-&gt; Module
-&gt; ModLocation
-&gt; NcgImpl statics instr jumpDest
-&gt; BufHandle
-&gt; UniqSupply
-&gt; Stream IO RawCmmGroup a
-&gt; NativeGenAcc statics instr
-&gt; IO (NativeGenAcc statics instr, UniqSupply, a)
forall statics instr jumpDest a.
(Outputable statics, Outputable instr, Outputable jumpDest,
 Instruction instr) =&gt;
DynFlags
-&gt; Module
-&gt; ModLocation
-&gt; NcgImpl statics instr jumpDest
-&gt; BufHandle
-&gt; UniqSupply
-&gt; Stream IO RawCmmGroup a
-&gt; NativeGenAcc statics instr
-&gt; IO (NativeGenAcc statics instr, UniqSupply, a)
</span><a href="GHC.CmmToAsm.html#cmmNativeGenStream"><span class="hs-identifier hs-var">cmmNativeGenStream</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044582"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681044581"><span class="hs-identifier hs-var">this_mod</span></a></span><span> </span><span class="annot"><span class="annottext">ModLocation
</span><a href="#local-6989586621681044580"><span class="hs-identifier hs-var">modLoc</span></a></span><span> </span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
</span><a href="#local-6989586621681044579"><span class="hs-identifier hs-var">ncgImpl</span></a></span><span> </span><span class="annot"><span class="annottext">BufHandle
</span><a href="#local-6989586621681044575"><span class="hs-identifier hs-var">bufh</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681044577"><span class="hs-identifier hs-var">us</span></a></span><span>
</span><span id="line-338"></span><span>                                         </span><span class="annot"><span class="annottext">Stream IO RawCmmGroup a
</span><a href="#local-6989586621681044576"><span class="hs-identifier hs-var">cmms</span></a></span><span> </span><span class="annot"><span class="annottext">NativeGenAcc statics instr
forall {statics} {instr}. NativeGenAcc statics instr
</span><a href="#local-6989586621681044571"><span class="hs-identifier hs-var">ngs0</span></a></span><span>
</span><span id="line-339"></span><span>        </span><span class="annot"><span class="annottext">UniqSupply
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">DynFlags
-&gt; ModLocation
-&gt; BufHandle
-&gt; UniqSupply
-&gt; NativeGenAcc statics instr
-&gt; IO UniqSupply
forall instr statics.
Instruction instr =&gt;
DynFlags
-&gt; ModLocation
-&gt; BufHandle
-&gt; UniqSupply
-&gt; NativeGenAcc statics instr
-&gt; IO UniqSupply
</span><a href="GHC.CmmToAsm.html#finishNativeGen"><span class="hs-identifier hs-var">finishNativeGen</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044582"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">ModLocation
</span><a href="#local-6989586621681044580"><span class="hs-identifier hs-var">modLoc</span></a></span><span> </span><span class="annot"><span class="annottext">BufHandle
</span><a href="#local-6989586621681044575"><span class="hs-identifier hs-var">bufh</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681044567"><span class="hs-identifier hs-var">us'</span></a></span><span> </span><span class="annot"><span class="annottext">NativeGenAcc statics instr
</span><a href="#local-6989586621681044568"><span class="hs-identifier hs-var">ngs</span></a></span><span>
</span><span id="line-340"></span><span>        </span><span class="annot"><span class="annottext">a -&gt; IO a
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681044566"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-341"></span><span>
</span><span id="line-342"></span><span id="local-6989586621681045122"><span id="local-6989586621681045123"><span class="annot"><a href="GHC.CmmToAsm.html#finishNativeGen"><span class="hs-identifier hs-type">finishNativeGen</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#Instruction"><span class="hs-identifier hs-type">Instruction</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045123"><span class="hs-identifier hs-type">instr</span></a></span><span>
</span><span id="line-343"></span><span>                </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span>
</span><span id="line-344"></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Module.Location.html#ModLocation"><span class="hs-identifier hs-type">ModLocation</span></a></span><span>
</span><span id="line-345"></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.BufHandle.html#BufHandle"><span class="hs-identifier hs-type">BufHandle</span></a></span><span>
</span><span id="line-346"></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Supply.html#UniqSupply"><span class="hs-identifier hs-type">UniqSupply</span></a></span><span>
</span><span id="line-347"></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.html#NativeGenAcc"><span class="hs-identifier hs-type">NativeGenAcc</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045122"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045123"><span class="hs-identifier hs-type">instr</span></a></span><span>
</span><span id="line-348"></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="GHC.Types.Unique.Supply.html#UniqSupply"><span class="hs-identifier hs-type">UniqSupply</span></a></span></span></span><span>
</span><span id="line-349"></span><span id="finishNativeGen"><span class="annot"><span class="annottext">finishNativeGen :: forall instr statics.
Instruction instr =&gt;
DynFlags
-&gt; ModLocation
-&gt; BufHandle
-&gt; UniqSupply
-&gt; NativeGenAcc statics instr
-&gt; IO UniqSupply
</span><a href="GHC.CmmToAsm.html#finishNativeGen"><span class="hs-identifier hs-var hs-var">finishNativeGen</span></a></span></span><span> </span><span id="local-6989586621681044525"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044525"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681044524"><span class="annot"><span class="annottext">ModLocation
</span><a href="#local-6989586621681044524"><span class="hs-identifier hs-var">modLoc</span></a></span></span><span> </span><span id="local-6989586621681044523"><span class="annot"><span class="annottext">bufh :: BufHandle
</span><a href="#local-6989586621681044523"><span class="hs-identifier hs-var">bufh</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.BufHandle.html#BufHandle"><span class="hs-identifier hs-type">BufHandle</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr Word8
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">FastMutInt
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681044521"><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621681044521"><span class="hs-identifier hs-var">h</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681044520"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681044520"><span class="hs-identifier hs-var">us</span></a></span></span><span> </span><span id="local-6989586621681044519"><span class="annot"><span class="annottext">NativeGenAcc statics instr
</span><a href="#local-6989586621681044519"><span class="hs-identifier hs-var">ngs</span></a></span></span><span>
</span><span id="line-350"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags
-&gt; SDoc -&gt; (UniqSupply -&gt; ()) -&gt; IO UniqSupply -&gt; IO UniqSupply
forall (m :: * -&gt; *) a.
MonadIO m =&gt;
DynFlags -&gt; SDoc -&gt; (a -&gt; ()) -&gt; m a -&gt; m a
</span><a href="GHC.Utils.Error.html#withTimingSilent"><span class="hs-identifier hs-var">withTimingSilent</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044525"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;NCG&quot;</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">UniqSupply -&gt; () -&gt; ()
</span><span class="hs-operator hs-var">`seq`</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(IO UniqSupply -&gt; IO UniqSupply) -&gt; IO UniqSupply -&gt; IO UniqSupply
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-351"></span><span>        </span><span class="hs-comment">-- Write debug data and finish</span><span>
</span><span id="line-352"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681044516"><span class="annot"><span class="annottext">emitDw :: Bool
</span><a href="#local-6989586621681044516"><span class="hs-identifier hs-var hs-var">emitDw</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; Int
</span><a href="GHC.Driver.Session.html#debugLevel"><span class="hs-identifier hs-var hs-var">debugLevel</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044525"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-353"></span><span>        </span><span id="local-6989586621681044513"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681044513"><span class="hs-identifier hs-var">us'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681044516"><span class="hs-identifier hs-var">emitDw</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">UniqSupply -&gt; IO UniqSupply
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681044520"><span class="hs-identifier hs-var">us</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-354"></span><span>          </span><span class="hs-special">(</span><span id="local-6989586621681044511"><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681044511"><span class="hs-identifier hs-var">dwarf</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681044510"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681044510"><span class="hs-identifier hs-var">us'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">DynFlags
-&gt; ModLocation
-&gt; UniqSupply
-&gt; [DebugBlock]
-&gt; IO (SDoc, UniqSupply)
</span><a href="GHC.CmmToAsm.Dwarf.html#dwarfGen"><span class="hs-identifier hs-var">dwarfGen</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044525"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">ModLocation
</span><a href="#local-6989586621681044524"><span class="hs-identifier hs-var">modLoc</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681044520"><span class="hs-identifier hs-var">us</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NativeGenAcc statics instr -&gt; [DebugBlock]
forall statics instr. NativeGenAcc statics instr -&gt; [DebugBlock]
</span><a href="GHC.CmmToAsm.html#ngs_debug"><span class="hs-identifier hs-var hs-var">ngs_debug</span></a></span><span> </span><span class="annot"><span class="annottext">NativeGenAcc statics instr
</span><a href="#local-6989586621681044519"><span class="hs-identifier hs-var">ngs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-355"></span><span>          </span><span class="annot"><span class="annottext">DynFlags -&gt; BufHandle -&gt; SDoc -&gt; IO ()
</span><a href="GHC.CmmToAsm.html#emitNativeCode"><span class="hs-identifier hs-var">emitNativeCode</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044525"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">BufHandle
</span><a href="#local-6989586621681044523"><span class="hs-identifier hs-var">bufh</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681044511"><span class="hs-identifier hs-var">dwarf</span></a></span><span>
</span><span id="line-356"></span><span>          </span><span class="annot"><span class="annottext">UniqSupply -&gt; IO UniqSupply
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681044510"><span class="hs-identifier hs-var">us'</span></a></span><span>
</span><span id="line-357"></span><span>        </span><span class="annot"><span class="annottext">BufHandle -&gt; IO ()
</span><a href="GHC.Utils.BufHandle.html#bFlush"><span class="hs-identifier hs-var">bFlush</span></a></span><span> </span><span class="annot"><span class="annottext">BufHandle
</span><a href="#local-6989586621681044523"><span class="hs-identifier hs-var">bufh</span></a></span><span>
</span><span id="line-358"></span><span>
</span><span id="line-359"></span><span>        </span><span class="hs-comment">-- dump global NCG stats for graph coloring allocator</span><span>
</span><span id="line-360"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681044506"><span class="annot"><span class="annottext">stats :: [RegAllocStats statics instr]
</span><a href="#local-6989586621681044506"><span class="hs-identifier hs-var hs-var">stats</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[[RegAllocStats statics instr]] -&gt; [RegAllocStats statics instr]
forall (t :: * -&gt; *) a. Foldable t =&gt; t [a] -&gt; [a]
</span><a href="../../base/src/Data.Foldable.html#concat"><span class="hs-identifier hs-var">concat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NativeGenAcc statics instr -&gt; [[RegAllocStats statics instr]]
forall statics instr.
NativeGenAcc statics instr -&gt; [[RegAllocStats statics instr]]
</span><a href="GHC.CmmToAsm.html#ngs_colorStats"><span class="hs-identifier hs-var hs-var">ngs_colorStats</span></a></span><span> </span><span class="annot"><span class="annottext">NativeGenAcc statics instr
</span><a href="#local-6989586621681044519"><span class="hs-identifier hs-var">ngs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-361"></span><span>        </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/Control.Monad.html#unless"><span class="hs-identifier hs-var">unless</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[RegAllocStats statics instr] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[RegAllocStats statics instr]
</span><a href="#local-6989586621681044506"><span class="hs-identifier hs-var">stats</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-362"></span><span>
</span><span id="line-363"></span><span>          </span><span class="hs-comment">-- build the global register conflict graph</span><span>
</span><span id="line-364"></span><span>          </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681044502"><span class="annot"><span class="annottext">graphGlobal :: Graph VirtualReg RegClass RealReg
</span><a href="#local-6989586621681044502"><span class="hs-identifier hs-var hs-var">graphGlobal</span></a></span></span><span>
</span><span id="line-365"></span><span>                  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Graph VirtualReg RegClass RealReg
 -&gt; Graph VirtualReg RegClass RealReg
 -&gt; Graph VirtualReg RegClass RealReg)
-&gt; Graph VirtualReg RegClass RealReg
-&gt; [Graph VirtualReg RegClass RealReg]
-&gt; Graph VirtualReg RegClass RealReg
forall (t :: * -&gt; *) b a.
Foldable t =&gt;
(b -&gt; a -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldl%27"><span class="hs-identifier hs-var">foldl'</span></a></span><span> </span><span class="annot"><span class="annottext">Graph VirtualReg RegClass RealReg
-&gt; Graph VirtualReg RegClass RealReg
-&gt; Graph VirtualReg RegClass RealReg
forall k cls color.
Graph k cls color -&gt; Graph k cls color -&gt; Graph k cls color
</span><a href="GHC.Data.Graph.Ops.html#union"><span class="hs-identifier hs-var">Color.union</span></a></span><span> </span><span class="annot"><span class="annottext">Graph VirtualReg RegClass RealReg
forall k cls color. Graph k cls color
</span><a href="GHC.Data.Graph.Base.html#initGraph"><span class="hs-identifier hs-var">Color.initGraph</span></a></span><span>
</span><span id="line-366"></span><span>                  </span><span class="annot"><span class="annottext">([Graph VirtualReg RegClass RealReg]
 -&gt; Graph VirtualReg RegClass RealReg)
-&gt; [Graph VirtualReg RegClass RealReg]
-&gt; Graph VirtualReg RegClass RealReg
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">RegAllocStats statics instr -&gt; Graph VirtualReg RegClass RealReg
forall statics instr.
RegAllocStats statics instr -&gt; Graph VirtualReg RegClass RealReg
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#raGraph"><span class="hs-identifier hs-var hs-var">Color.raGraph</span></a></span><span> </span><span class="annot"><span class="annottext">RegAllocStats statics instr
</span><a href="#local-6989586621681044497"><span class="hs-identifier hs-var">stat</span></a></span><span>
</span><span id="line-367"></span><span>                          </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621681044497"><span class="annot"><span class="annottext">stat :: RegAllocStats statics instr
</span><a href="#local-6989586621681044497"><span class="hs-identifier hs-var">stat</span></a></span></span><span class="hs-glyph">@</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#RegAllocStatsStart"><span class="hs-identifier hs-type">Color.RegAllocStatsStart</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[RegAllocStats statics instr]
</span><a href="#local-6989586621681044506"><span class="hs-identifier hs-var">stats</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-368"></span><span>
</span><span id="line-369"></span><span>          </span><span class="annot"><span class="annottext">SDoc -&gt; IO ()
</span><a href="#local-6989586621681044495"><span class="hs-identifier hs-var">dump_stats</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[RegAllocStats statics instr]
-&gt; Graph VirtualReg RegClass RealReg -&gt; SDoc
forall statics instr.
[RegAllocStats statics instr]
-&gt; Graph VirtualReg RegClass RealReg -&gt; SDoc
</span><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#pprStats"><span class="hs-identifier hs-var">Color.pprStats</span></a></span><span> </span><span class="annot"><span class="annottext">[RegAllocStats statics instr]
</span><a href="#local-6989586621681044506"><span class="hs-identifier hs-var">stats</span></a></span><span> </span><span class="annot"><span class="annottext">Graph VirtualReg RegClass RealReg
</span><a href="#local-6989586621681044502"><span class="hs-identifier hs-var">graphGlobal</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-370"></span><span>
</span><span id="line-371"></span><span>          </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681044493"><span class="annot"><span class="annottext">platform :: Platform
</span><a href="#local-6989586621681044493"><span class="hs-identifier hs-var hs-var">platform</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; Platform
</span><a href="GHC.Driver.Session.html#targetPlatform"><span class="hs-identifier hs-var hs-var">targetPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044525"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-372"></span><span>          </span><span class="annot"><span class="annottext">DynFlags -&gt; DumpFlag -&gt; String -&gt; DumpFormat -&gt; SDoc -&gt; IO ()
</span><a href="GHC.Utils.Error.html#dumpIfSet_dyn"><span class="hs-identifier hs-var">dumpIfSet_dyn</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044525"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-373"></span><span>                  </span><span class="annot"><span class="annottext">DumpFlag
</span><a href="GHC.Driver.Flags.html#Opt_D_dump_asm_conflicts"><span class="hs-identifier hs-var">Opt_D_dump_asm_conflicts</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Register conflict graph&quot;</span></span><span>
</span><span id="line-374"></span><span>                  </span><span class="annot"><span class="annottext">DumpFormat
</span><a href="GHC.Utils.Error.html#FormatText"><span class="hs-identifier hs-var">FormatText</span></a></span><span>
</span><span id="line-375"></span><span>                  </span><span class="annot"><span class="annottext">(SDoc -&gt; IO ()) -&gt; SDoc -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(RealReg -&gt; SDoc)
-&gt; Triv VirtualReg RegClass RealReg
-&gt; Graph VirtualReg RegClass RealReg
-&gt; SDoc
forall k cls color.
(Uniquable k, Outputable k, Outputable cls, Outputable color) =&gt;
(color -&gt; SDoc) -&gt; Triv k cls color -&gt; Graph k cls color -&gt; SDoc
</span><a href="GHC.Data.Graph.Ppr.html#dotGraph"><span class="hs-identifier hs-var">Color.dotGraph</span></a></span><span>
</span><span id="line-376"></span><span>                          </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; RealReg -&gt; SDoc
</span><a href="GHC.CmmToAsm.Reg.Target.html#targetRegDotColor"><span class="hs-identifier hs-var">targetRegDotColor</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681044493"><span class="hs-identifier hs-var">platform</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-377"></span><span>                          </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform
-&gt; (RegClass -&gt; VirtualReg -&gt; Int)
-&gt; (RegClass -&gt; RealReg -&gt; Int)
-&gt; Triv VirtualReg RegClass RealReg
</span><a href="GHC.CmmToAsm.Reg.Graph.TrivColorable.html#trivColorable"><span class="hs-identifier hs-var">Color.trivColorable</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681044493"><span class="hs-identifier hs-var">platform</span></a></span><span>
</span><span id="line-378"></span><span>                                  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; RegClass -&gt; VirtualReg -&gt; Int
</span><a href="GHC.CmmToAsm.Reg.Target.html#targetVirtualRegSqueeze"><span class="hs-identifier hs-var">targetVirtualRegSqueeze</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681044493"><span class="hs-identifier hs-var">platform</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-379"></span><span>                                  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; RegClass -&gt; RealReg -&gt; Int
</span><a href="GHC.CmmToAsm.Reg.Target.html#targetRealRegSqueeze"><span class="hs-identifier hs-var">targetRealRegSqueeze</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681044493"><span class="hs-identifier hs-var">platform</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-380"></span><span>                  </span><span class="annot"><span class="annottext">(Graph VirtualReg RegClass RealReg -&gt; SDoc)
-&gt; Graph VirtualReg RegClass RealReg -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Graph VirtualReg RegClass RealReg
</span><a href="#local-6989586621681044502"><span class="hs-identifier hs-var">graphGlobal</span></a></span><span>
</span><span id="line-381"></span><span>
</span><span id="line-382"></span><span>
</span><span id="line-383"></span><span>        </span><span class="hs-comment">-- dump global NCG stats for linear allocator</span><span>
</span><span id="line-384"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681044483"><span class="annot"><span class="annottext">linearStats :: [RegAllocStats]
</span><a href="#local-6989586621681044483"><span class="hs-identifier hs-var hs-var">linearStats</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[[RegAllocStats]] -&gt; [RegAllocStats]
forall (t :: * -&gt; *) a. Foldable t =&gt; t [a] -&gt; [a]
</span><a href="../../base/src/Data.Foldable.html#concat"><span class="hs-identifier hs-var">concat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NativeGenAcc statics instr -&gt; [[RegAllocStats]]
forall statics instr.
NativeGenAcc statics instr -&gt; [[RegAllocStats]]
</span><a href="GHC.CmmToAsm.html#ngs_linearStats"><span class="hs-identifier hs-var hs-var">ngs_linearStats</span></a></span><span> </span><span class="annot"><span class="annottext">NativeGenAcc statics instr
</span><a href="#local-6989586621681044519"><span class="hs-identifier hs-var">ngs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-385"></span><span>        </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/Control.Monad.html#unless"><span class="hs-identifier hs-var">unless</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[RegAllocStats] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[RegAllocStats]
</span><a href="#local-6989586621681044483"><span class="hs-identifier hs-var">linearStats</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-386"></span><span>          </span><span class="annot"><span class="annottext">SDoc -&gt; IO ()
</span><a href="#local-6989586621681044495"><span class="hs-identifier hs-var">dump_stats</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[NatCmmDecl statics instr] -&gt; [RegAllocStats] -&gt; SDoc
forall instr statics.
Instruction instr =&gt;
[NatCmmDecl statics instr] -&gt; [RegAllocStats] -&gt; SDoc
</span><a href="GHC.CmmToAsm.Reg.Linear.Stats.html#pprStats"><span class="hs-identifier hs-var">Linear.pprStats</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[[NatCmmDecl statics instr]] -&gt; [NatCmmDecl statics instr]
forall (t :: * -&gt; *) a. Foldable t =&gt; t [a] -&gt; [a]
</span><a href="../../base/src/Data.Foldable.html#concat"><span class="hs-identifier hs-var">concat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NativeGenAcc statics instr -&gt; [[NatCmmDecl statics instr]]
forall statics instr.
NativeGenAcc statics instr -&gt; [[NatCmmDecl statics instr]]
</span><a href="GHC.CmmToAsm.html#ngs_natives"><span class="hs-identifier hs-var hs-var">ngs_natives</span></a></span><span> </span><span class="annot"><span class="annottext">NativeGenAcc statics instr
</span><a href="#local-6989586621681044519"><span class="hs-identifier hs-var">ngs</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[RegAllocStats]
</span><a href="#local-6989586621681044483"><span class="hs-identifier hs-var">linearStats</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-387"></span><span>
</span><span id="line-388"></span><span>        </span><span class="hs-comment">-- write out the imports</span><span>
</span><span id="line-389"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681044481"><span class="annot"><span class="annottext">ctx :: SDocContext
</span><a href="#local-6989586621681044481"><span class="hs-identifier hs-var hs-var">ctx</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; PprStyle -&gt; SDocContext
</span><a href="GHC.Driver.Session.html#initSDocContext"><span class="hs-identifier hs-var">initSDocContext</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044525"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CodeStyle -&gt; PprStyle
</span><a href="GHC.Utils.Outputable.html#mkCodeStyle"><span class="hs-identifier hs-var">mkCodeStyle</span></a></span><span> </span><span class="annot"><span class="annottext">CodeStyle
</span><a href="GHC.Utils.Outputable.html#AsmStyle"><span class="hs-identifier hs-var">AsmStyle</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-390"></span><span>        </span><span class="annot"><span class="annottext">SDocContext -&gt; Mode -&gt; Handle -&gt; SDoc -&gt; IO ()
</span><a href="GHC.Utils.Outputable.html#printSDocLn"><span class="hs-identifier hs-var">printSDocLn</span></a></span><span> </span><span class="annot"><span class="annottext">SDocContext
</span><a href="#local-6989586621681044481"><span class="hs-identifier hs-var">ctx</span></a></span><span> </span><span class="annot"><span class="annottext">Mode
</span><a href="GHC.Utils.Ppr.html#LeftMode"><span class="hs-identifier hs-var">Pretty.LeftMode</span></a></span><span> </span><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621681044521"><span class="hs-identifier hs-var">h</span></a></span><span>
</span><span id="line-391"></span><span>                </span><span class="annot"><span class="annottext">(SDoc -&gt; IO ()) -&gt; SDoc -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; [CLabel] -&gt; SDoc
</span><a href="GHC.CmmToAsm.html#makeImportsDoc"><span class="hs-identifier hs-var">makeImportsDoc</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044525"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[[CLabel]] -&gt; [CLabel]
forall (t :: * -&gt; *) a. Foldable t =&gt; t [a] -&gt; [a]
</span><a href="../../base/src/Data.Foldable.html#concat"><span class="hs-identifier hs-var">concat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NativeGenAcc statics instr -&gt; [[CLabel]]
forall statics instr. NativeGenAcc statics instr -&gt; [[CLabel]]
</span><a href="GHC.CmmToAsm.html#ngs_imports"><span class="hs-identifier hs-var hs-var">ngs_imports</span></a></span><span> </span><span class="annot"><span class="annottext">NativeGenAcc statics instr
</span><a href="#local-6989586621681044519"><span class="hs-identifier hs-var">ngs</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-392"></span><span>        </span><span class="annot"><span class="annottext">UniqSupply -&gt; IO UniqSupply
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681044513"><span class="hs-identifier hs-var">us'</span></a></span><span>
</span><span id="line-393"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-394"></span><span>    </span><span id="local-6989586621681044495"><span class="annot"><span class="annottext">dump_stats :: SDoc -&gt; IO ()
</span><a href="#local-6989586621681044495"><span class="hs-identifier hs-var hs-var">dump_stats</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DumpAction
</span><a href="GHC.Utils.Error.html#dumpAction"><span class="hs-identifier hs-var">dumpAction</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044525"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PrintUnqualified -&gt; PprStyle
</span><a href="GHC.Utils.Outputable.html#mkDumpStyle"><span class="hs-identifier hs-var">mkDumpStyle</span></a></span><span> </span><span class="annot"><span class="annottext">PrintUnqualified
</span><a href="GHC.Utils.Outputable.html#alwaysQualify"><span class="hs-identifier hs-var">alwaysQualify</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-395"></span><span>                   </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DumpFlag -&gt; DumpOptions
</span><a href="GHC.Utils.Error.html#dumpOptionsFromFlag"><span class="hs-identifier hs-var">dumpOptionsFromFlag</span></a></span><span> </span><span class="annot"><span class="annottext">DumpFlag
</span><a href="GHC.Driver.Flags.html#Opt_D_dump_asm_stats"><span class="hs-identifier hs-var">Opt_D_dump_asm_stats</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;NCG stats&quot;</span></span><span>
</span><span id="line-396"></span><span>                   </span><span class="annot"><span class="annottext">DumpFormat
</span><a href="GHC.Utils.Error.html#FormatText"><span class="hs-identifier hs-var">FormatText</span></a></span><span>
</span><span id="line-397"></span><span>
</span><span id="line-398"></span><span id="local-6989586621681045124"><span id="local-6989586621681045125"><span id="local-6989586621681045126"><span id="local-6989586621681045127"><span class="annot"><a href="GHC.CmmToAsm.html#cmmNativeGenStream"><span class="hs-identifier hs-type">cmmNativeGenStream</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045127"><span class="hs-identifier hs-type">statics</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045126"><span class="hs-identifier hs-type">instr</span></a></span><span>
</span><span id="line-399"></span><span>                      </span><span class="hs-special">,</span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045125"><span class="hs-identifier hs-type">jumpDest</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#Instruction"><span class="hs-identifier hs-type">Instruction</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045126"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-400"></span><span>              </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span>
</span><span id="line-401"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Module.Location.html#ModLocation"><span class="hs-identifier hs-type">ModLocation</span></a></span><span>
</span><span id="line-402"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Monad.html#NcgImpl"><span class="hs-identifier hs-type">NcgImpl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045127"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045126"><span class="hs-identifier hs-type">instr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045125"><span class="hs-identifier hs-type">jumpDest</span></a></span><span>
</span><span id="line-403"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.BufHandle.html#BufHandle"><span class="hs-identifier hs-type">BufHandle</span></a></span><span>
</span><span id="line-404"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Supply.html#UniqSupply"><span class="hs-identifier hs-type">UniqSupply</span></a></span><span>
</span><span id="line-405"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Data.Stream.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="GHC.Cmm.html#RawCmmGroup"><span class="hs-identifier hs-type">RawCmmGroup</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045124"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-406"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.html#NativeGenAcc"><span class="hs-identifier hs-type">NativeGenAcc</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045127"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045126"><span class="hs-identifier hs-type">instr</span></a></span><span>
</span><span id="line-407"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.html#NativeGenAcc"><span class="hs-identifier hs-type">NativeGenAcc</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045127"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045126"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Supply.html#UniqSupply"><span class="hs-identifier hs-type">UniqSupply</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621681045124"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span></span></span></span><span>
</span><span id="line-408"></span><span>
</span><span id="line-409"></span><span id="cmmNativeGenStream"><span class="annot"><span class="annottext">cmmNativeGenStream :: forall statics instr jumpDest a.
(Outputable statics, Outputable instr, Outputable jumpDest,
 Instruction instr) =&gt;
DynFlags
-&gt; Module
-&gt; ModLocation
-&gt; NcgImpl statics instr jumpDest
-&gt; BufHandle
-&gt; UniqSupply
-&gt; Stream IO RawCmmGroup a
-&gt; NativeGenAcc statics instr
-&gt; IO (NativeGenAcc statics instr, UniqSupply, a)
</span><a href="GHC.CmmToAsm.html#cmmNativeGenStream"><span class="hs-identifier hs-var hs-var">cmmNativeGenStream</span></a></span></span><span> </span><span id="local-6989586621681044444"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044444"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681044443"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681044443"><span class="hs-identifier hs-var">this_mod</span></a></span></span><span> </span><span id="local-6989586621681044442"><span class="annot"><span class="annottext">ModLocation
</span><a href="#local-6989586621681044442"><span class="hs-identifier hs-var">modLoc</span></a></span></span><span> </span><span id="local-6989586621681044441"><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
</span><a href="#local-6989586621681044441"><span class="hs-identifier hs-var">ncgImpl</span></a></span></span><span> </span><span id="local-6989586621681044440"><span class="annot"><span class="annottext">BufHandle
</span><a href="#local-6989586621681044440"><span class="hs-identifier hs-var">h</span></a></span></span><span> </span><span id="local-6989586621681044439"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681044439"><span class="hs-identifier hs-var">us</span></a></span></span><span> </span><span id="local-6989586621681044438"><span class="annot"><span class="annottext">Stream IO RawCmmGroup a
</span><a href="#local-6989586621681044438"><span class="hs-identifier hs-var">cmm_stream</span></a></span></span><span> </span><span id="local-6989586621681044437"><span class="annot"><span class="annottext">NativeGenAcc statics instr
</span><a href="#local-6989586621681044437"><span class="hs-identifier hs-var">ngs</span></a></span></span><span>
</span><span id="line-410"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621681044436"><span class="annot"><span class="annottext">Either a (RawCmmGroup, Stream IO RawCmmGroup a)
</span><a href="#local-6989586621681044436"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Stream IO RawCmmGroup a
-&gt; IO (Either a (RawCmmGroup, Stream IO RawCmmGroup a))
forall (m :: * -&gt; *) a b.
Stream m a b -&gt; m (Either b (a, Stream m a b))
</span><a href="GHC.Data.Stream.html#runStream"><span class="hs-identifier hs-var hs-var">Stream.runStream</span></a></span><span> </span><span class="annot"><span class="annottext">Stream IO RawCmmGroup a
</span><a href="#local-6989586621681044438"><span class="hs-identifier hs-var">cmm_stream</span></a></span><span>
</span><span id="line-411"></span><span>      </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Either a (RawCmmGroup, Stream IO RawCmmGroup a)
</span><a href="#local-6989586621681044436"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-412"></span><span>        </span><span class="annot"><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-type">Left</span></a></span><span> </span><span id="local-6989586621681044434"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681044434"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-413"></span><span>          </span><span class="annot"><span class="annottext">(NativeGenAcc statics instr, UniqSupply, a)
-&gt; IO (NativeGenAcc statics instr, UniqSupply, a)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NativeGenAcc statics instr
</span><a href="#local-6989586621681044437"><span class="hs-identifier hs-var">ngs</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ngs_imports :: [[CLabel]]
</span><a href="GHC.CmmToAsm.html#ngs_imports"><span class="hs-identifier hs-var">ngs_imports</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[[CLabel]] -&gt; [[CLabel]]
forall a. [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#reverse"><span class="hs-identifier hs-var">reverse</span></a></span><span> </span><span class="annot"><span class="annottext">([[CLabel]] -&gt; [[CLabel]]) -&gt; [[CLabel]] -&gt; [[CLabel]]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">NativeGenAcc statics instr -&gt; [[CLabel]]
forall statics instr. NativeGenAcc statics instr -&gt; [[CLabel]]
</span><a href="GHC.CmmToAsm.html#ngs_imports"><span class="hs-identifier hs-var hs-var">ngs_imports</span></a></span><span> </span><span class="annot"><span class="annottext">NativeGenAcc statics instr
</span><a href="#local-6989586621681044437"><span class="hs-identifier hs-var">ngs</span></a></span><span>
</span><span id="line-414"></span><span>                      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ngs_natives :: [[NatCmmDecl statics instr]]
</span><a href="GHC.CmmToAsm.html#ngs_natives"><span class="hs-identifier hs-var">ngs_natives</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[[NatCmmDecl statics instr]] -&gt; [[NatCmmDecl statics instr]]
forall a. [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#reverse"><span class="hs-identifier hs-var">reverse</span></a></span><span> </span><span class="annot"><span class="annottext">([[NatCmmDecl statics instr]] -&gt; [[NatCmmDecl statics instr]])
-&gt; [[NatCmmDecl statics instr]] -&gt; [[NatCmmDecl statics instr]]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">NativeGenAcc statics instr -&gt; [[NatCmmDecl statics instr]]
forall statics instr.
NativeGenAcc statics instr -&gt; [[NatCmmDecl statics instr]]
</span><a href="GHC.CmmToAsm.html#ngs_natives"><span class="hs-identifier hs-var hs-var">ngs_natives</span></a></span><span> </span><span class="annot"><span class="annottext">NativeGenAcc statics instr
</span><a href="#local-6989586621681044437"><span class="hs-identifier hs-var">ngs</span></a></span><span>
</span><span id="line-415"></span><span>                      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ngs_colorStats :: [[RegAllocStats statics instr]]
</span><a href="GHC.CmmToAsm.html#ngs_colorStats"><span class="hs-identifier hs-var">ngs_colorStats</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[[RegAllocStats statics instr]] -&gt; [[RegAllocStats statics instr]]
forall a. [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#reverse"><span class="hs-identifier hs-var">reverse</span></a></span><span> </span><span class="annot"><span class="annottext">([[RegAllocStats statics instr]]
 -&gt; [[RegAllocStats statics instr]])
-&gt; [[RegAllocStats statics instr]]
-&gt; [[RegAllocStats statics instr]]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">NativeGenAcc statics instr -&gt; [[RegAllocStats statics instr]]
forall statics instr.
NativeGenAcc statics instr -&gt; [[RegAllocStats statics instr]]
</span><a href="GHC.CmmToAsm.html#ngs_colorStats"><span class="hs-identifier hs-var hs-var">ngs_colorStats</span></a></span><span> </span><span class="annot"><span class="annottext">NativeGenAcc statics instr
</span><a href="#local-6989586621681044437"><span class="hs-identifier hs-var">ngs</span></a></span><span>
</span><span id="line-416"></span><span>                      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ngs_linearStats :: [[RegAllocStats]]
</span><a href="GHC.CmmToAsm.html#ngs_linearStats"><span class="hs-identifier hs-var">ngs_linearStats</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[[RegAllocStats]] -&gt; [[RegAllocStats]]
forall a. [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#reverse"><span class="hs-identifier hs-var">reverse</span></a></span><span> </span><span class="annot"><span class="annottext">([[RegAllocStats]] -&gt; [[RegAllocStats]])
-&gt; [[RegAllocStats]] -&gt; [[RegAllocStats]]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">NativeGenAcc statics instr -&gt; [[RegAllocStats]]
forall statics instr.
NativeGenAcc statics instr -&gt; [[RegAllocStats]]
</span><a href="GHC.CmmToAsm.html#ngs_linearStats"><span class="hs-identifier hs-var hs-var">ngs_linearStats</span></a></span><span> </span><span class="annot"><span class="annottext">NativeGenAcc statics instr
</span><a href="#local-6989586621681044437"><span class="hs-identifier hs-var">ngs</span></a></span><span>
</span><span id="line-417"></span><span>                      </span><span class="hs-special">}</span><span class="hs-special">,</span><span>
</span><span id="line-418"></span><span>                  </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681044439"><span class="hs-identifier hs-var">us</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-419"></span><span>                  </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681044434"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-420"></span><span>        </span><span class="annot"><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-type">Right</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681044432"><span class="annot"><span class="annottext">RawCmmGroup
</span><a href="#local-6989586621681044432"><span class="hs-identifier hs-var">cmms</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681044431"><span class="annot"><span class="annottext">Stream IO RawCmmGroup a
</span><a href="#local-6989586621681044431"><span class="hs-identifier hs-var">cmm_stream'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-421"></span><span>          </span><span class="hs-special">(</span><span id="local-6989586621681044430"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681044430"><span class="hs-identifier hs-var">us'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681044429"><span class="annot"><span class="annottext">NativeGenAcc statics instr
</span><a href="#local-6989586621681044429"><span class="hs-identifier hs-var">ngs''</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span>
</span><span id="line-422"></span><span>            </span><span class="annot"><span class="annottext">DynFlags
-&gt; SDoc
-&gt; ((UniqSupply, NativeGenAcc statics instr) -&gt; ())
-&gt; IO (UniqSupply, NativeGenAcc statics instr)
-&gt; IO (UniqSupply, NativeGenAcc statics instr)
forall (m :: * -&gt; *) a.
MonadIO m =&gt;
DynFlags -&gt; SDoc -&gt; (a -&gt; ()) -&gt; m a -&gt; m a
</span><a href="GHC.Utils.Error.html#withTimingSilent"><span class="hs-identifier hs-var">withTimingSilent</span></a></span><span>
</span><span id="line-423"></span><span>                </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044444"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-424"></span><span>                </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681044428"><span class="hs-identifier hs-var">ncglabel</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span id="local-6989586621681044427"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681044427"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681044426"><span class="annot"><span class="annottext">NativeGenAcc statics instr
</span><a href="#local-6989586621681044426"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681044427"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSupply -&gt; () -&gt; ()
</span><span class="hs-operator hs-var">`seq`</span></span><span> </span><span class="annot"><span class="annottext">NativeGenAcc statics instr
</span><a href="#local-6989586621681044426"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">NativeGenAcc statics instr -&gt; () -&gt; ()
</span><span class="hs-operator hs-var">`seq`</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(IO (UniqSupply, NativeGenAcc statics instr)
 -&gt; IO (UniqSupply, NativeGenAcc statics instr))
-&gt; IO (UniqSupply, NativeGenAcc statics instr)
-&gt; IO (UniqSupply, NativeGenAcc statics instr)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-425"></span><span>              </span><span class="hs-comment">-- Generate debug information</span><span>
</span><span id="line-426"></span><span>              </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681044425"><span class="annot"><span class="annottext">debugFlag :: Bool
</span><a href="#local-6989586621681044425"><span class="hs-identifier hs-var hs-var">debugFlag</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; Int
</span><a href="GHC.Driver.Session.html#debugLevel"><span class="hs-identifier hs-var hs-var">debugLevel</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044444"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-427"></span><span>                  </span><span class="hs-glyph">!</span><span id="local-6989586621681044424"><span class="annot"><span class="annottext">ndbgs :: [DebugBlock]
</span><a href="#local-6989586621681044424"><span class="hs-identifier hs-var hs-var">ndbgs</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681044425"><span class="hs-identifier hs-var">debugFlag</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ModLocation -&gt; RawCmmGroup -&gt; [DebugBlock]
</span><a href="GHC.Cmm.DebugBlock.html#cmmDebugGen"><span class="hs-identifier hs-var">cmmDebugGen</span></a></span><span> </span><span class="annot"><span class="annottext">ModLocation
</span><a href="#local-6989586621681044442"><span class="hs-identifier hs-var">modLoc</span></a></span><span> </span><span class="annot"><span class="annottext">RawCmmGroup
</span><a href="#local-6989586621681044432"><span class="hs-identifier hs-var">cmms</span></a></span><span>
</span><span id="line-428"></span><span>                         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-429"></span><span>                  </span><span id="local-6989586621681044422"><span class="annot"><span class="annottext">dbgMap :: LabelMap DebugBlock
</span><a href="#local-6989586621681044422"><span class="hs-identifier hs-var hs-var">dbgMap</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[DebugBlock] -&gt; LabelMap DebugBlock
</span><a href="GHC.Cmm.DebugBlock.html#debugToMap"><span class="hs-identifier hs-var">debugToMap</span></a></span><span> </span><span class="annot"><span class="annottext">[DebugBlock]
</span><a href="#local-6989586621681044424"><span class="hs-identifier hs-var">ndbgs</span></a></span><span>
</span><span id="line-430"></span><span>
</span><span id="line-431"></span><span>              </span><span class="hs-comment">-- Generate native code</span><span>
</span><span id="line-432"></span><span>              </span><span class="hs-special">(</span><span id="local-6989586621681044420"><span class="annot"><span class="annottext">NativeGenAcc statics instr
</span><a href="#local-6989586621681044420"><span class="hs-identifier hs-var">ngs'</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621681044419"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681044419"><span class="hs-identifier hs-var">us'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">DynFlags
-&gt; Module
-&gt; ModLocation
-&gt; NcgImpl statics instr jumpDest
-&gt; BufHandle
-&gt; LabelMap DebugBlock
-&gt; UniqSupply
-&gt; RawCmmGroup
-&gt; NativeGenAcc statics instr
-&gt; Int
-&gt; IO (NativeGenAcc statics instr, UniqSupply)
forall statics instr jumpDest.
(Outputable statics, Outputable instr, Outputable jumpDest,
 Instruction instr) =&gt;
DynFlags
-&gt; Module
-&gt; ModLocation
-&gt; NcgImpl statics instr jumpDest
-&gt; BufHandle
-&gt; LabelMap DebugBlock
-&gt; UniqSupply
-&gt; RawCmmGroup
-&gt; NativeGenAcc statics instr
-&gt; Int
-&gt; IO (NativeGenAcc statics instr, UniqSupply)
</span><a href="GHC.CmmToAsm.html#cmmNativeGens"><span class="hs-identifier hs-var">cmmNativeGens</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044444"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681044443"><span class="hs-identifier hs-var">this_mod</span></a></span><span> </span><span class="annot"><span class="annottext">ModLocation
</span><a href="#local-6989586621681044442"><span class="hs-identifier hs-var">modLoc</span></a></span><span> </span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
</span><a href="#local-6989586621681044441"><span class="hs-identifier hs-var">ncgImpl</span></a></span><span> </span><span class="annot"><span class="annottext">BufHandle
</span><a href="#local-6989586621681044440"><span class="hs-identifier hs-var">h</span></a></span><span>
</span><span id="line-433"></span><span>                                               </span><span class="annot"><span class="annottext">LabelMap DebugBlock
</span><a href="#local-6989586621681044422"><span class="hs-identifier hs-var">dbgMap</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681044439"><span class="hs-identifier hs-var">us</span></a></span><span> </span><span class="annot"><span class="annottext">RawCmmGroup
</span><a href="#local-6989586621681044432"><span class="hs-identifier hs-var">cmms</span></a></span><span> </span><span class="annot"><span class="annottext">NativeGenAcc statics instr
</span><a href="#local-6989586621681044437"><span class="hs-identifier hs-var">ngs</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-434"></span><span>
</span><span id="line-435"></span><span>              </span><span class="hs-comment">-- Link native code information into debug blocks</span><span>
</span><span id="line-436"></span><span>              </span><span class="hs-comment">-- See Note [What is this unwinding business?] in &quot;GHC.Cmm.DebugBlock&quot;.</span><span>
</span><span id="line-437"></span><span>              </span><span class="hs-keyword">let</span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621681044417"><span class="annot"><span class="annottext">ldbgs :: [DebugBlock]
</span><a href="#local-6989586621681044417"><span class="hs-identifier hs-var hs-var">ldbgs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[BlockId] -&gt; LabelMap [UnwindPoint] -&gt; [DebugBlock] -&gt; [DebugBlock]
</span><a href="GHC.Cmm.DebugBlock.html#cmmDebugLink"><span class="hs-identifier hs-var">cmmDebugLink</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NativeGenAcc statics instr -&gt; [BlockId]
forall statics instr. NativeGenAcc statics instr -&gt; [BlockId]
</span><a href="GHC.CmmToAsm.html#ngs_labels"><span class="hs-identifier hs-var hs-var">ngs_labels</span></a></span><span> </span><span class="annot"><span class="annottext">NativeGenAcc statics instr
</span><a href="#local-6989586621681044420"><span class="hs-identifier hs-var">ngs'</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NativeGenAcc statics instr -&gt; LabelMap [UnwindPoint]
forall statics instr.
NativeGenAcc statics instr -&gt; LabelMap [UnwindPoint]
</span><a href="GHC.CmmToAsm.html#ngs_unwinds"><span class="hs-identifier hs-var hs-var">ngs_unwinds</span></a></span><span> </span><span class="annot"><span class="annottext">NativeGenAcc statics instr
</span><a href="#local-6989586621681044420"><span class="hs-identifier hs-var">ngs'</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[DebugBlock]
</span><a href="#local-6989586621681044424"><span class="hs-identifier hs-var">ndbgs</span></a></span><span>
</span><span id="line-438"></span><span>              </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/Control.Monad.html#unless"><span class="hs-identifier hs-var">unless</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[DebugBlock] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[DebugBlock]
</span><a href="#local-6989586621681044417"><span class="hs-identifier hs-var">ldbgs</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-439"></span><span>                </span><span class="annot"><span class="annottext">DynFlags -&gt; DumpFlag -&gt; String -&gt; DumpFormat -&gt; SDoc -&gt; IO ()
</span><a href="GHC.Utils.Error.html#dumpIfSet_dyn"><span class="hs-identifier hs-var">dumpIfSet_dyn</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044444"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">DumpFlag
</span><a href="GHC.Driver.Flags.html#Opt_D_dump_debug"><span class="hs-identifier hs-var">Opt_D_dump_debug</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Debug Infos&quot;</span></span><span> </span><span class="annot"><span class="annottext">DumpFormat
</span><a href="GHC.Utils.Error.html#FormatText"><span class="hs-identifier hs-var">FormatText</span></a></span><span>
</span><span id="line-440"></span><span>                  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="annot"><span class="annottext">([SDoc] -&gt; SDoc) -&gt; [SDoc] -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(DebugBlock -&gt; SDoc) -&gt; [DebugBlock] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">[DebugBlock]
</span><a href="#local-6989586621681044417"><span class="hs-identifier hs-var">ldbgs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-441"></span><span>
</span><span id="line-442"></span><span>              </span><span class="hs-comment">-- Accumulate debug information for emission in finishNativeGen.</span><span>
</span><span id="line-443"></span><span>              </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681044412"><span class="annot"><span class="annottext">ngs'' :: NativeGenAcc statics instr
</span><a href="#local-6989586621681044412"><span class="hs-identifier hs-var hs-var">ngs''</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NativeGenAcc statics instr
</span><a href="#local-6989586621681044420"><span class="hs-identifier hs-var">ngs'</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ngs_debug :: [DebugBlock]
</span><a href="GHC.CmmToAsm.html#ngs_debug"><span class="hs-identifier hs-var">ngs_debug</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NativeGenAcc statics instr -&gt; [DebugBlock]
forall statics instr. NativeGenAcc statics instr -&gt; [DebugBlock]
</span><a href="GHC.CmmToAsm.html#ngs_debug"><span class="hs-identifier hs-var hs-var">ngs_debug</span></a></span><span> </span><span class="annot"><span class="annottext">NativeGenAcc statics instr
</span><a href="#local-6989586621681044420"><span class="hs-identifier hs-var">ngs'</span></a></span><span> </span><span class="annot"><span class="annottext">[DebugBlock] -&gt; [DebugBlock] -&gt; [DebugBlock]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[DebugBlock]
</span><a href="#local-6989586621681044417"><span class="hs-identifier hs-var">ldbgs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ngs_labels :: [BlockId]
</span><a href="GHC.CmmToAsm.html#ngs_labels"><span class="hs-identifier hs-var">ngs_labels</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-444"></span><span>              </span><span class="annot"><span class="annottext">(UniqSupply, NativeGenAcc statics instr)
-&gt; IO (UniqSupply, NativeGenAcc statics instr)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681044419"><span class="hs-identifier hs-var">us'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">NativeGenAcc statics instr
</span><a href="#local-6989586621681044412"><span class="hs-identifier hs-var">ngs''</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-445"></span><span>
</span><span id="line-446"></span><span>          </span><span class="annot"><span class="annottext">DynFlags
-&gt; Module
-&gt; ModLocation
-&gt; NcgImpl statics instr jumpDest
-&gt; BufHandle
-&gt; UniqSupply
-&gt; Stream IO RawCmmGroup a
-&gt; NativeGenAcc statics instr
-&gt; IO (NativeGenAcc statics instr, UniqSupply, a)
forall statics instr jumpDest a.
(Outputable statics, Outputable instr, Outputable jumpDest,
 Instruction instr) =&gt;
DynFlags
-&gt; Module
-&gt; ModLocation
-&gt; NcgImpl statics instr jumpDest
-&gt; BufHandle
-&gt; UniqSupply
-&gt; Stream IO RawCmmGroup a
-&gt; NativeGenAcc statics instr
-&gt; IO (NativeGenAcc statics instr, UniqSupply, a)
</span><a href="GHC.CmmToAsm.html#cmmNativeGenStream"><span class="hs-identifier hs-var">cmmNativeGenStream</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044444"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681044443"><span class="hs-identifier hs-var">this_mod</span></a></span><span> </span><span class="annot"><span class="annottext">ModLocation
</span><a href="#local-6989586621681044442"><span class="hs-identifier hs-var">modLoc</span></a></span><span> </span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
</span><a href="#local-6989586621681044441"><span class="hs-identifier hs-var">ncgImpl</span></a></span><span> </span><span class="annot"><span class="annottext">BufHandle
</span><a href="#local-6989586621681044440"><span class="hs-identifier hs-var">h</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681044430"><span class="hs-identifier hs-var">us'</span></a></span><span>
</span><span id="line-447"></span><span>              </span><span class="annot"><span class="annottext">Stream IO RawCmmGroup a
</span><a href="#local-6989586621681044431"><span class="hs-identifier hs-var">cmm_stream'</span></a></span><span> </span><span class="annot"><span class="annottext">NativeGenAcc statics instr
</span><a href="#local-6989586621681044429"><span class="hs-identifier hs-var">ngs''</span></a></span><span>
</span><span id="line-448"></span><span>
</span><span id="line-449"></span><span>    </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621681044428"><span class="annot"><span class="annottext">ncglabel :: SDoc
</span><a href="#local-6989586621681044428"><span class="hs-identifier hs-var hs-var">ncglabel</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;NCG&quot;</span></span><span>
</span><span id="line-450"></span><span>
</span><span id="line-451"></span><span class="hs-comment">-- | Do native code generation on all these cmms.</span><span>
</span><span id="line-452"></span><span class="hs-comment">--</span><span>
</span><span id="line-453"></span><span class="annot"><a href="GHC.CmmToAsm.html#cmmNativeGens"><span class="hs-identifier hs-type">cmmNativeGens</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-keyword">forall</span><span> </span><span id="local-6989586621681045066"><span class="annot"><a href="#local-6989586621681045066"><span class="hs-identifier hs-type">statics</span></a></span></span><span> </span><span id="local-6989586621681045065"><span class="annot"><a href="#local-6989586621681045065"><span class="hs-identifier hs-type">instr</span></a></span></span><span> </span><span id="local-6989586621681045064"><span class="annot"><a href="#local-6989586621681045064"><span class="hs-identifier hs-type">jumpDest</span></a></span></span><span class="hs-operator">.</span><span>
</span><span id="line-454"></span><span>                 </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045066"><span class="hs-identifier hs-type">statics</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045065"><span class="hs-identifier hs-type">instr</span></a></span><span>
</span><span id="line-455"></span><span>                 </span><span class="hs-special">,</span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045064"><span class="hs-identifier hs-type">jumpDest</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#Instruction"><span class="hs-identifier hs-type">Instruction</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045065"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-456"></span><span>              </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span>
</span><span id="line-457"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Module.Location.html#ModLocation"><span class="hs-identifier hs-type">ModLocation</span></a></span><span>
</span><span id="line-458"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Monad.html#NcgImpl"><span class="hs-identifier hs-type">NcgImpl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045066"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045065"><span class="hs-identifier hs-type">instr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045064"><span class="hs-identifier hs-type">jumpDest</span></a></span><span>
</span><span id="line-459"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.BufHandle.html#BufHandle"><span class="hs-identifier hs-type">BufHandle</span></a></span><span>
</span><span id="line-460"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#LabelMap"><span class="hs-identifier hs-type">LabelMap</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#DebugBlock"><span class="hs-identifier hs-type">DebugBlock</span></a></span><span>
</span><span id="line-461"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Supply.html#UniqSupply"><span class="hs-identifier hs-type">UniqSupply</span></a></span><span>
</span><span id="line-462"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.html#RawCmmDecl"><span class="hs-identifier hs-type">RawCmmDecl</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-463"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.html#NativeGenAcc"><span class="hs-identifier hs-type">NativeGenAcc</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045066"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045065"><span class="hs-identifier hs-type">instr</span></a></span><span>
</span><span id="line-464"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-465"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.html#NativeGenAcc"><span class="hs-identifier hs-type">NativeGenAcc</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045066"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045065"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Supply.html#UniqSupply"><span class="hs-identifier hs-type">UniqSupply</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-466"></span><span>
</span><span id="line-467"></span><span id="cmmNativeGens"><span class="annot"><span class="annottext">cmmNativeGens :: forall statics instr jumpDest.
(Outputable statics, Outputable instr, Outputable jumpDest,
 Instruction instr) =&gt;
DynFlags
-&gt; Module
-&gt; ModLocation
-&gt; NcgImpl statics instr jumpDest
-&gt; BufHandle
-&gt; LabelMap DebugBlock
-&gt; UniqSupply
-&gt; RawCmmGroup
-&gt; NativeGenAcc statics instr
-&gt; Int
-&gt; IO (NativeGenAcc statics instr, UniqSupply)
</span><a href="GHC.CmmToAsm.html#cmmNativeGens"><span class="hs-identifier hs-var hs-var">cmmNativeGens</span></a></span></span><span> </span><span id="local-6989586621681044388"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044388"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681044387"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681044387"><span class="hs-identifier hs-var">this_mod</span></a></span></span><span> </span><span id="local-6989586621681044386"><span class="annot"><span class="annottext">ModLocation
</span><a href="#local-6989586621681044386"><span class="hs-identifier hs-var">modLoc</span></a></span></span><span> </span><span id="local-6989586621681044385"><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
</span><a href="#local-6989586621681044385"><span class="hs-identifier hs-var">ncgImpl</span></a></span></span><span> </span><span id="local-6989586621681044384"><span class="annot"><span class="annottext">BufHandle
</span><a href="#local-6989586621681044384"><span class="hs-identifier hs-var">h</span></a></span></span><span> </span><span id="local-6989586621681044383"><span class="annot"><span class="annottext">LabelMap DebugBlock
</span><a href="#local-6989586621681044383"><span class="hs-identifier hs-var">dbgMap</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqSupply
-&gt; RawCmmGroup
-&gt; NativeGenAcc statics instr
-&gt; Int
-&gt; IO (NativeGenAcc statics instr, UniqSupply)
</span><a href="#local-6989586621681044382"><span class="hs-identifier hs-var">go</span></a></span><span>
</span><span id="line-468"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-469"></span><span>    </span><span class="annot"><a href="#local-6989586621681044382"><span class="hs-identifier hs-type">go</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Supply.html#UniqSupply"><span class="hs-identifier hs-type">UniqSupply</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.html#RawCmmDecl"><span class="hs-identifier hs-type">RawCmmDecl</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-470"></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.html#NativeGenAcc"><span class="hs-identifier hs-type">NativeGenAcc</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045066"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045065"><span class="hs-identifier hs-type">instr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-471"></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.html#NativeGenAcc"><span class="hs-identifier hs-type">NativeGenAcc</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045066"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045065"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Supply.html#UniqSupply"><span class="hs-identifier hs-type">UniqSupply</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-472"></span><span>
</span><span id="line-473"></span><span>    </span><span id="local-6989586621681044382"><span class="annot"><span class="annottext">go :: UniqSupply
-&gt; RawCmmGroup
-&gt; NativeGenAcc statics instr
-&gt; Int
-&gt; IO (NativeGenAcc statics instr, UniqSupply)
</span><a href="#local-6989586621681044382"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621681044381"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681044381"><span class="hs-identifier hs-var">us</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span id="local-6989586621681044380"><span class="annot"><span class="annottext">NativeGenAcc statics instr
</span><a href="#local-6989586621681044380"><span class="hs-identifier hs-var">ngs</span></a></span></span><span> </span><span class="hs-glyph">!</span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-474"></span><span>        </span><span class="annot"><span class="annottext">(NativeGenAcc statics instr, UniqSupply)
-&gt; IO (NativeGenAcc statics instr, UniqSupply)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NativeGenAcc statics instr
</span><a href="#local-6989586621681044380"><span class="hs-identifier hs-var">ngs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681044381"><span class="hs-identifier hs-var">us</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-475"></span><span>
</span><span id="line-476"></span><span>    </span><span class="annot"><a href="#local-6989586621681044382"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span id="local-6989586621681044379"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681044379"><span class="hs-identifier hs-var">us</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681044378"><span class="annot"><span class="annottext">RawCmmDecl
</span><a href="#local-6989586621681044378"><span class="hs-identifier hs-var">cmm</span></a></span></span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621681044377"><span class="annot"><span class="annottext">RawCmmGroup
</span><a href="#local-6989586621681044377"><span class="hs-identifier hs-var">cmms</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681044376"><span class="annot"><span class="annottext">NativeGenAcc statics instr
</span><a href="#local-6989586621681044376"><span class="hs-identifier hs-var">ngs</span></a></span></span><span> </span><span id="local-6989586621681044375"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681044375"><span class="hs-identifier hs-var">count</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-477"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681044374"><span class="annot"><span class="annottext">fileIds :: DwarfFiles
</span><a href="#local-6989586621681044374"><span class="hs-identifier hs-var hs-var">fileIds</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NativeGenAcc statics instr -&gt; DwarfFiles
forall statics instr. NativeGenAcc statics instr -&gt; DwarfFiles
</span><a href="GHC.CmmToAsm.html#ngs_dwarfFiles"><span class="hs-identifier hs-var hs-var">ngs_dwarfFiles</span></a></span><span> </span><span class="annot"><span class="annottext">NativeGenAcc statics instr
</span><a href="#local-6989586621681044376"><span class="hs-identifier hs-var">ngs</span></a></span><span>
</span><span id="line-478"></span><span>        </span><span class="hs-special">(</span><span id="local-6989586621681044373"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681044373"><span class="hs-identifier hs-var">us'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681044372"><span class="annot"><span class="annottext">DwarfFiles
</span><a href="#local-6989586621681044372"><span class="hs-identifier hs-var">fileIds'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681044371"><span class="annot"><span class="annottext">[NatCmmDecl statics instr]
</span><a href="#local-6989586621681044371"><span class="hs-identifier hs-var">native</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681044370"><span class="annot"><span class="annottext">[CLabel]
</span><a href="#local-6989586621681044370"><span class="hs-identifier hs-var">imports</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681044369"><span class="annot"><span class="annottext">Maybe [RegAllocStats statics instr]
</span><a href="#local-6989586621681044369"><span class="hs-identifier hs-var">colorStats</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681044368"><span class="annot"><span class="annottext">Maybe [RegAllocStats]
</span><a href="#local-6989586621681044368"><span class="hs-identifier hs-var">linearStats</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681044367"><span class="annot"><span class="annottext">LabelMap [UnwindPoint]
</span><a href="#local-6989586621681044367"><span class="hs-identifier hs-var">unwinds</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-479"></span><span>          </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-pragma">{-# SCC</span><span> </span><span class="hs-pragma">&quot;cmmNativeGen&quot;</span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-480"></span><span>             </span><span class="annot"><span class="annottext">DynFlags
-&gt; Module
-&gt; ModLocation
-&gt; NcgImpl statics instr jumpDest
-&gt; UniqSupply
-&gt; DwarfFiles
-&gt; LabelMap DebugBlock
-&gt; RawCmmDecl
-&gt; Int
-&gt; IO
     (UniqSupply, DwarfFiles, [NatCmmDecl statics instr], [CLabel],
      Maybe [RegAllocStats statics instr], Maybe [RegAllocStats],
      LabelMap [UnwindPoint])
forall statics instr jumpDest.
(Instruction instr, Outputable statics, Outputable instr,
 Outputable jumpDest) =&gt;
DynFlags
-&gt; Module
-&gt; ModLocation
-&gt; NcgImpl statics instr jumpDest
-&gt; UniqSupply
-&gt; DwarfFiles
-&gt; LabelMap DebugBlock
-&gt; RawCmmDecl
-&gt; Int
-&gt; IO
     (UniqSupply, DwarfFiles, [NatCmmDecl statics instr], [CLabel],
      Maybe [RegAllocStats statics instr], Maybe [RegAllocStats],
      LabelMap [UnwindPoint])
</span><a href="GHC.CmmToAsm.html#cmmNativeGen"><span class="hs-identifier hs-var">cmmNativeGen</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044388"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681044387"><span class="hs-identifier hs-var">this_mod</span></a></span><span> </span><span class="annot"><span class="annottext">ModLocation
</span><a href="#local-6989586621681044386"><span class="hs-identifier hs-var">modLoc</span></a></span><span> </span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
</span><a href="#local-6989586621681044385"><span class="hs-identifier hs-var">ncgImpl</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681044379"><span class="hs-identifier hs-var">us</span></a></span><span> </span><span class="annot"><span class="annottext">DwarfFiles
</span><a href="#local-6989586621681044374"><span class="hs-identifier hs-var">fileIds</span></a></span><span> </span><span class="annot"><span class="annottext">LabelMap DebugBlock
</span><a href="#local-6989586621681044383"><span class="hs-identifier hs-var">dbgMap</span></a></span><span>
</span><span id="line-481"></span><span>                          </span><span class="annot"><span class="annottext">RawCmmDecl
</span><a href="#local-6989586621681044378"><span class="hs-identifier hs-var">cmm</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681044375"><span class="hs-identifier hs-var">count</span></a></span><span>
</span><span id="line-482"></span><span>
</span><span id="line-483"></span><span>        </span><span class="hs-comment">-- Generate .file directives for every new file that has been</span><span>
</span><span id="line-484"></span><span>        </span><span class="hs-comment">-- used. Note that it is important that we generate these in</span><span>
</span><span id="line-485"></span><span>        </span><span class="hs-comment">-- ascending order, as Clang's 3.6 assembler complains.</span><span>
</span><span id="line-486"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681044366"><span class="annot"><span class="annottext">newFileIds :: [(FastString, Int)]
</span><a href="#local-6989586621681044366"><span class="hs-identifier hs-var hs-var">newFileIds</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">((FastString, Int) -&gt; (FastString, Int) -&gt; Ordering)
-&gt; [(FastString, Int)] -&gt; [(FastString, Int)]
forall a. (a -&gt; a -&gt; Ordering) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#sortBy"><span class="hs-identifier hs-var">sortBy</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">((FastString, Int) -&gt; Int)
-&gt; (FastString, Int) -&gt; (FastString, Int) -&gt; Ordering
forall a b. Ord a =&gt; (b -&gt; a) -&gt; b -&gt; b -&gt; Ordering
</span><a href="../../base/src/Data.Ord.html#comparing"><span class="hs-identifier hs-var">comparing</span></a></span><span> </span><span class="annot"><span class="annottext">(FastString, Int) -&gt; Int
forall a b. (a, b) -&gt; b
</span><a href="../../base/src/Data.Tuple.html#snd"><span class="hs-identifier hs-var">snd</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([(FastString, Int)] -&gt; [(FastString, Int)])
-&gt; [(FastString, Int)] -&gt; [(FastString, Int)]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-487"></span><span>                         </span><span class="annot"><span class="annottext">DwarfFiles -&gt; [(FastString, Int)]
forall key elt. UniqFM key elt -&gt; [elt]
</span><a href="GHC.Types.Unique.FM.html#nonDetEltsUFM"><span class="hs-identifier hs-var">nonDetEltsUFM</span></a></span><span> </span><span class="annot"><span class="annottext">(DwarfFiles -&gt; [(FastString, Int)])
-&gt; DwarfFiles -&gt; [(FastString, Int)]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">DwarfFiles
</span><a href="#local-6989586621681044372"><span class="hs-identifier hs-var">fileIds'</span></a></span><span> </span><span class="annot"><span class="annottext">DwarfFiles -&gt; DwarfFiles -&gt; DwarfFiles
forall key elt1 elt2.
UniqFM key elt1 -&gt; UniqFM key elt2 -&gt; UniqFM key elt1
</span><a href="GHC.Types.Unique.FM.html#minusUFM"><span class="hs-operator hs-var">`minusUFM`</span></a></span><span> </span><span class="annot"><span class="annottext">DwarfFiles
</span><a href="#local-6989586621681044374"><span class="hs-identifier hs-var">fileIds</span></a></span><span>
</span><span id="line-488"></span><span>            </span><span class="hs-comment">-- See Note [Unique Determinism and code generation]</span><span>
</span><span id="line-489"></span><span>            </span><span id="local-6989586621681044360"><span class="annot"><span class="annottext">pprDecl :: (FastString, a) -&gt; SDoc
</span><a href="#local-6989586621681044360"><span class="hs-identifier hs-var hs-var">pprDecl</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681044359"><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621681044359"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621681044358"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681044358"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;\t.file &quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681044358"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span>
</span><span id="line-490"></span><span>                            </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#pprFilePathString"><span class="hs-identifier hs-var">pprFilePathString</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FastString -&gt; String
</span><a href="GHC.Data.FastString.html#unpackFS"><span class="hs-identifier hs-var">unpackFS</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621681044359"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-491"></span><span>
</span><span id="line-492"></span><span>        </span><span class="annot"><span class="annottext">DynFlags -&gt; BufHandle -&gt; SDoc -&gt; IO ()
</span><a href="GHC.CmmToAsm.html#emitNativeCode"><span class="hs-identifier hs-var">emitNativeCode</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044388"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">BufHandle
</span><a href="#local-6989586621681044384"><span class="hs-identifier hs-var">h</span></a></span><span> </span><span class="annot"><span class="annottext">(SDoc -&gt; IO ()) -&gt; SDoc -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="annot"><span class="annottext">([SDoc] -&gt; SDoc) -&gt; [SDoc] -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-493"></span><span>          </span><span class="annot"><span class="annottext">((FastString, Int) -&gt; SDoc) -&gt; [(FastString, Int)] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">(FastString, Int) -&gt; SDoc
forall {a}. Outputable a =&gt; (FastString, a) -&gt; SDoc
</span><a href="#local-6989586621681044360"><span class="hs-identifier hs-var">pprDecl</span></a></span><span> </span><span class="annot"><span class="annottext">[(FastString, Int)]
</span><a href="#local-6989586621681044366"><span class="hs-identifier hs-var">newFileIds</span></a></span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; [SDoc] -&gt; [SDoc]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-494"></span><span>          </span><span class="annot"><span class="annottext">(NatCmmDecl statics instr -&gt; SDoc)
-&gt; [NatCmmDecl statics instr] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest -&gt; NatCmmDecl statics instr -&gt; SDoc
forall statics instr jumpDest.
NcgImpl statics instr jumpDest -&gt; NatCmmDecl statics instr -&gt; SDoc
</span><a href="GHC.CmmToAsm.Monad.html#pprNatCmmDecl"><span class="hs-identifier hs-var hs-var">pprNatCmmDecl</span></a></span><span> </span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
</span><a href="#local-6989586621681044385"><span class="hs-identifier hs-var">ncgImpl</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[NatCmmDecl statics instr]
</span><a href="#local-6989586621681044371"><span class="hs-identifier hs-var">native</span></a></span><span>
</span><span id="line-495"></span><span>
</span><span id="line-496"></span><span>        </span><span class="hs-comment">-- force evaluation all this stuff to avoid space leaks</span><span>
</span><span id="line-497"></span><span>        </span><span class="hs-pragma">{-# SCC</span><span> </span><span class="hs-pragma">&quot;seqString&quot;</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="annot"><span class="annottext">() -&gt; IO ()
forall a. a -&gt; IO a
</span><a href="../../base/src/GHC.IO.html#evaluate"><span class="hs-identifier hs-var">evaluate</span></a></span><span> </span><span class="annot"><span class="annottext">(() -&gt; IO ()) -&gt; () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; () -&gt; ()
forall a b. [a] -&gt; b -&gt; b
</span><a href="GHC.Utils.Misc.html#seqList"><span class="hs-identifier hs-var">seqList</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; SDoc -&gt; String
</span><a href="GHC.Utils.Outputable.html#showSDoc"><span class="hs-identifier hs-var">showSDoc</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044388"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">(SDoc -&gt; String) -&gt; SDoc -&gt; String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="annot"><span class="annottext">([SDoc] -&gt; SDoc) -&gt; [SDoc] -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(CLabel -&gt; SDoc) -&gt; [CLabel] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">[CLabel]
</span><a href="#local-6989586621681044370"><span class="hs-identifier hs-var">imports</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-498"></span><span>
</span><span id="line-499"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621681044350"><span class="annot"><span class="annottext">labels' :: [BlockId]
</span><a href="#local-6989586621681044350"><span class="hs-identifier hs-var hs-var">labels'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; Int
</span><a href="GHC.Driver.Session.html#debugLevel"><span class="hs-identifier hs-var hs-var">debugLevel</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044388"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-500"></span><span>                       </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">(instr -&gt; Bool) -&gt; [NatCmmDecl statics instr] -&gt; [BlockId]
forall i d g.
(i -&gt; Bool) -&gt; GenCmmGroup d g (ListGraph i) -&gt; [BlockId]
</span><a href="GHC.Cmm.DebugBlock.html#cmmDebugLabels"><span class="hs-identifier hs-var">cmmDebugLabels</span></a></span><span> </span><span class="annot"><span class="annottext">instr -&gt; Bool
forall instr. Instruction instr =&gt; instr -&gt; Bool
</span><a href="GHC.CmmToAsm.Instr.html#isMetaInstr"><span class="hs-identifier hs-var">isMetaInstr</span></a></span><span> </span><span class="annot"><span class="annottext">[NatCmmDecl statics instr]
</span><a href="#local-6989586621681044371"><span class="hs-identifier hs-var">native</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-501"></span><span>            </span><span class="hs-glyph">!</span><span id="local-6989586621681044347"><span class="annot"><span class="annottext">natives' :: [[NatCmmDecl statics instr]]
</span><a href="#local-6989586621681044347"><span class="hs-identifier hs-var hs-var">natives'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">DumpFlag -&gt; DynFlags -&gt; Bool
</span><a href="GHC.Driver.Session.html#dopt"><span class="hs-identifier hs-var">dopt</span></a></span><span> </span><span class="annot"><span class="annottext">DumpFlag
</span><a href="GHC.Driver.Flags.html#Opt_D_dump_asm_stats"><span class="hs-identifier hs-var">Opt_D_dump_asm_stats</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044388"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-502"></span><span>                        </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">[NatCmmDecl statics instr]
</span><a href="#local-6989586621681044371"><span class="hs-identifier hs-var">native</span></a></span><span> </span><span class="annot"><span class="annottext">[NatCmmDecl statics instr]
-&gt; [[NatCmmDecl statics instr]] -&gt; [[NatCmmDecl statics instr]]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">NativeGenAcc statics instr -&gt; [[NatCmmDecl statics instr]]
forall statics instr.
NativeGenAcc statics instr -&gt; [[NatCmmDecl statics instr]]
</span><a href="GHC.CmmToAsm.html#ngs_natives"><span class="hs-identifier hs-var hs-var">ngs_natives</span></a></span><span> </span><span class="annot"><span class="annottext">NativeGenAcc statics instr
</span><a href="#local-6989586621681044376"><span class="hs-identifier hs-var">ngs</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-503"></span><span>
</span><span id="line-504"></span><span>            </span><span id="local-6989586621681044345"><span class="annot"><span class="annottext">mCon :: Maybe a -&gt; [a] -&gt; [a]
</span><a href="#local-6989586621681044345"><span class="hs-identifier hs-var hs-var">mCon</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">([a] -&gt; [a]) -&gt; (a -&gt; [a] -&gt; [a]) -&gt; Maybe a -&gt; [a] -&gt; [a]
forall b a. b -&gt; (a -&gt; b) -&gt; Maybe a -&gt; b
</span><a href="../../base/src/Data.Maybe.html#maybe"><span class="hs-identifier hs-var">maybe</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [a]
forall a. a -&gt; a
</span><a href="../../base/src/GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">:</span><span class="hs-special">)</span><span>
</span><span id="line-505"></span><span>            </span><span id="local-6989586621681044343"><span class="annot"><span class="annottext">ngs' :: NativeGenAcc statics instr
</span><a href="#local-6989586621681044343"><span class="hs-identifier hs-var hs-var">ngs'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NativeGenAcc statics instr
</span><a href="#local-6989586621681044376"><span class="hs-identifier hs-var">ngs</span></a></span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ngs_imports :: [[CLabel]]
</span><a href="GHC.CmmToAsm.html#ngs_imports"><span class="hs-identifier hs-var">ngs_imports</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[CLabel]
</span><a href="#local-6989586621681044370"><span class="hs-identifier hs-var">imports</span></a></span><span> </span><span class="annot"><span class="annottext">[CLabel] -&gt; [[CLabel]] -&gt; [[CLabel]]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">NativeGenAcc statics instr -&gt; [[CLabel]]
forall statics instr. NativeGenAcc statics instr -&gt; [[CLabel]]
</span><a href="GHC.CmmToAsm.html#ngs_imports"><span class="hs-identifier hs-var hs-var">ngs_imports</span></a></span><span> </span><span class="annot"><span class="annottext">NativeGenAcc statics instr
</span><a href="#local-6989586621681044376"><span class="hs-identifier hs-var">ngs</span></a></span><span>
</span><span id="line-506"></span><span>                      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ngs_natives :: [[NatCmmDecl statics instr]]
</span><a href="GHC.CmmToAsm.html#ngs_natives"><span class="hs-identifier hs-var">ngs_natives</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[[NatCmmDecl statics instr]]
</span><a href="#local-6989586621681044347"><span class="hs-identifier hs-var">natives'</span></a></span><span>
</span><span id="line-507"></span><span>                      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ngs_colorStats :: [[RegAllocStats statics instr]]
</span><a href="GHC.CmmToAsm.html#ngs_colorStats"><span class="hs-identifier hs-var">ngs_colorStats</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe [RegAllocStats statics instr]
</span><a href="#local-6989586621681044369"><span class="hs-identifier hs-var">colorStats</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe [RegAllocStats statics instr]
-&gt; [[RegAllocStats statics instr]]
-&gt; [[RegAllocStats statics instr]]
forall {a}. Maybe a -&gt; [a] -&gt; [a]
</span><a href="#local-6989586621681044345"><span class="hs-operator hs-var">`mCon`</span></a></span><span> </span><span class="annot"><span class="annottext">NativeGenAcc statics instr -&gt; [[RegAllocStats statics instr]]
forall statics instr.
NativeGenAcc statics instr -&gt; [[RegAllocStats statics instr]]
</span><a href="GHC.CmmToAsm.html#ngs_colorStats"><span class="hs-identifier hs-var hs-var">ngs_colorStats</span></a></span><span> </span><span class="annot"><span class="annottext">NativeGenAcc statics instr
</span><a href="#local-6989586621681044376"><span class="hs-identifier hs-var">ngs</span></a></span><span>
</span><span id="line-508"></span><span>                      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ngs_linearStats :: [[RegAllocStats]]
</span><a href="GHC.CmmToAsm.html#ngs_linearStats"><span class="hs-identifier hs-var">ngs_linearStats</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe [RegAllocStats]
</span><a href="#local-6989586621681044368"><span class="hs-identifier hs-var">linearStats</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe [RegAllocStats] -&gt; [[RegAllocStats]] -&gt; [[RegAllocStats]]
forall {a}. Maybe a -&gt; [a] -&gt; [a]
</span><a href="#local-6989586621681044345"><span class="hs-operator hs-var">`mCon`</span></a></span><span> </span><span class="annot"><span class="annottext">NativeGenAcc statics instr -&gt; [[RegAllocStats]]
forall statics instr.
NativeGenAcc statics instr -&gt; [[RegAllocStats]]
</span><a href="GHC.CmmToAsm.html#ngs_linearStats"><span class="hs-identifier hs-var hs-var">ngs_linearStats</span></a></span><span> </span><span class="annot"><span class="annottext">NativeGenAcc statics instr
</span><a href="#local-6989586621681044376"><span class="hs-identifier hs-var">ngs</span></a></span><span>
</span><span id="line-509"></span><span>                      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ngs_labels :: [BlockId]
</span><a href="GHC.CmmToAsm.html#ngs_labels"><span class="hs-identifier hs-var">ngs_labels</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NativeGenAcc statics instr -&gt; [BlockId]
forall statics instr. NativeGenAcc statics instr -&gt; [BlockId]
</span><a href="GHC.CmmToAsm.html#ngs_labels"><span class="hs-identifier hs-var hs-var">ngs_labels</span></a></span><span> </span><span class="annot"><span class="annottext">NativeGenAcc statics instr
</span><a href="#local-6989586621681044376"><span class="hs-identifier hs-var">ngs</span></a></span><span> </span><span class="annot"><span class="annottext">[BlockId] -&gt; [BlockId] -&gt; [BlockId]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[BlockId]
</span><a href="#local-6989586621681044350"><span class="hs-identifier hs-var">labels'</span></a></span><span>
</span><span id="line-510"></span><span>                      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ngs_dwarfFiles :: DwarfFiles
</span><a href="GHC.CmmToAsm.html#ngs_dwarfFiles"><span class="hs-identifier hs-var">ngs_dwarfFiles</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DwarfFiles
</span><a href="#local-6989586621681044372"><span class="hs-identifier hs-var">fileIds'</span></a></span><span>
</span><span id="line-511"></span><span>                      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ngs_unwinds :: LabelMap [UnwindPoint]
</span><a href="GHC.CmmToAsm.html#ngs_unwinds"><span class="hs-identifier hs-var">ngs_unwinds</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NativeGenAcc statics instr -&gt; LabelMap [UnwindPoint]
forall statics instr.
NativeGenAcc statics instr -&gt; LabelMap [UnwindPoint]
</span><a href="GHC.CmmToAsm.html#ngs_unwinds"><span class="hs-identifier hs-var hs-var">ngs_unwinds</span></a></span><span> </span><span class="annot"><span class="annottext">NativeGenAcc statics instr
</span><a href="#local-6989586621681044376"><span class="hs-identifier hs-var">ngs</span></a></span><span> </span><span class="annot"><span class="annottext">LabelMap [UnwindPoint]
-&gt; LabelMap [UnwindPoint] -&gt; LabelMap [UnwindPoint]
forall (map :: * -&gt; *) a. IsMap map =&gt; map a -&gt; map a -&gt; map a
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapUnion"><span class="hs-operator hs-var">`mapUnion`</span></a></span><span> </span><span class="annot"><span class="annottext">LabelMap [UnwindPoint]
</span><a href="#local-6989586621681044367"><span class="hs-identifier hs-var">unwinds</span></a></span><span>
</span><span id="line-512"></span><span>                      </span><span class="hs-special">}</span><span>
</span><span id="line-513"></span><span>        </span><span class="annot"><span class="annottext">UniqSupply
-&gt; RawCmmGroup
-&gt; NativeGenAcc statics instr
-&gt; Int
-&gt; IO (NativeGenAcc statics instr, UniqSupply)
</span><a href="#local-6989586621681044382"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681044373"><span class="hs-identifier hs-var">us'</span></a></span><span> </span><span class="annot"><span class="annottext">RawCmmGroup
</span><a href="#local-6989586621681044377"><span class="hs-identifier hs-var">cmms</span></a></span><span> </span><span class="annot"><span class="annottext">NativeGenAcc statics instr
</span><a href="#local-6989586621681044343"><span class="hs-identifier hs-var">ngs'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681044375"><span class="hs-identifier hs-var">count</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-514"></span><span>
</span><span id="line-515"></span><span>
</span><span id="line-516"></span><span class="annot"><a href="GHC.CmmToAsm.html#emitNativeCode"><span class="hs-identifier hs-type">emitNativeCode</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.BufHandle.html#BufHandle"><span class="hs-identifier hs-type">BufHandle</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-517"></span><span id="emitNativeCode"><span class="annot"><span class="annottext">emitNativeCode :: DynFlags -&gt; BufHandle -&gt; SDoc -&gt; IO ()
</span><a href="GHC.CmmToAsm.html#emitNativeCode"><span class="hs-identifier hs-var hs-var">emitNativeCode</span></a></span></span><span> </span><span id="local-6989586621681044340"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044340"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681044339"><span class="annot"><span class="annottext">BufHandle
</span><a href="#local-6989586621681044339"><span class="hs-identifier hs-var">h</span></a></span></span><span> </span><span id="local-6989586621681044338"><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681044338"><span class="hs-identifier hs-var">sdoc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-518"></span><span>
</span><span id="line-519"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681044337"><span class="annot"><span class="annottext">ctx :: SDocContext
</span><a href="#local-6989586621681044337"><span class="hs-identifier hs-var hs-var">ctx</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; PprStyle -&gt; SDocContext
</span><a href="GHC.Driver.Session.html#initSDocContext"><span class="hs-identifier hs-var">initSDocContext</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044340"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CodeStyle -&gt; PprStyle
</span><a href="GHC.Utils.Outputable.html#mkCodeStyle"><span class="hs-identifier hs-var">mkCodeStyle</span></a></span><span> </span><span class="annot"><span class="annottext">CodeStyle
</span><a href="GHC.Utils.Outputable.html#AsmStyle"><span class="hs-identifier hs-var">AsmStyle</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-520"></span><span>        </span><span class="hs-pragma">{-# SCC</span><span> </span><span class="hs-pragma">&quot;pprNativeCode&quot;</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="annot"><span class="annottext">SDocContext -&gt; BufHandle -&gt; SDoc -&gt; IO ()
</span><a href="GHC.Utils.Outputable.html#bufLeftRenderSDoc"><span class="hs-identifier hs-var">bufLeftRenderSDoc</span></a></span><span> </span><span class="annot"><span class="annottext">SDocContext
</span><a href="#local-6989586621681044337"><span class="hs-identifier hs-var">ctx</span></a></span><span> </span><span class="annot"><span class="annottext">BufHandle
</span><a href="#local-6989586621681044339"><span class="hs-identifier hs-var">h</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681044338"><span class="hs-identifier hs-var">sdoc</span></a></span><span>
</span><span id="line-521"></span><span>
</span><span id="line-522"></span><span>        </span><span class="hs-comment">-- dump native code</span><span>
</span><span id="line-523"></span><span>        </span><span class="annot"><span class="annottext">DynFlags -&gt; DumpFlag -&gt; String -&gt; DumpFormat -&gt; SDoc -&gt; IO ()
</span><a href="GHC.Utils.Error.html#dumpIfSet_dyn"><span class="hs-identifier hs-var">dumpIfSet_dyn</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044340"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-524"></span><span>                </span><span class="annot"><span class="annottext">DumpFlag
</span><a href="GHC.Driver.Flags.html#Opt_D_dump_asm"><span class="hs-identifier hs-var">Opt_D_dump_asm</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Asm code&quot;</span></span><span> </span><span class="annot"><span class="annottext">DumpFormat
</span><a href="GHC.Utils.Error.html#FormatASM"><span class="hs-identifier hs-var">FormatASM</span></a></span><span>
</span><span id="line-525"></span><span>                </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681044338"><span class="hs-identifier hs-var">sdoc</span></a></span><span>
</span><span id="line-526"></span><span>
</span><span id="line-527"></span><span class="hs-comment">-- | Complete native code generation phase for a single top-level chunk of Cmm.</span><span>
</span><span id="line-528"></span><span class="hs-comment">--      Dumping the output of each stage along the way.</span><span>
</span><span id="line-529"></span><span class="hs-comment">--      Global conflict graph and NGC stats</span><span>
</span><span id="line-530"></span><span class="annot"><a href="GHC.CmmToAsm.html#cmmNativeGen"><span class="hs-identifier hs-type">cmmNativeGen</span></a></span><span>
</span><span id="line-531"></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="hs-keyword">forall</span><span> </span><span id="local-6989586621681045058"><span class="annot"><a href="#local-6989586621681045058"><span class="hs-identifier hs-type">statics</span></a></span></span><span> </span><span id="local-6989586621681045059"><span class="annot"><a href="#local-6989586621681045059"><span class="hs-identifier hs-type">instr</span></a></span></span><span> </span><span id="local-6989586621681045057"><span class="annot"><a href="#local-6989586621681045057"><span class="hs-identifier hs-type">jumpDest</span></a></span></span><span class="hs-operator">.</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#Instruction"><span class="hs-identifier hs-type">Instruction</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045059"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-532"></span><span>        </span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045058"><span class="hs-identifier hs-type">statics</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045059"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045057"><span class="hs-identifier hs-type">jumpDest</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-533"></span><span>    </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span>
</span><span id="line-534"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Module.Location.html#ModLocation"><span class="hs-identifier hs-type">ModLocation</span></a></span><span>
</span><span id="line-535"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Monad.html#NcgImpl"><span class="hs-identifier hs-type">NcgImpl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045058"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045059"><span class="hs-identifier hs-type">instr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045057"><span class="hs-identifier hs-type">jumpDest</span></a></span><span>
</span><span id="line-536"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Supply.html#UniqSupply"><span class="hs-identifier hs-type">UniqSupply</span></a></span><span>
</span><span id="line-537"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Monad.html#DwarfFiles"><span class="hs-identifier hs-type">DwarfFiles</span></a></span><span>
</span><span id="line-538"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#LabelMap"><span class="hs-identifier hs-type">LabelMap</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#DebugBlock"><span class="hs-identifier hs-type">DebugBlock</span></a></span><span>
</span><span id="line-539"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.html#RawCmmDecl"><span class="hs-identifier hs-type">RawCmmDecl</span></a></span><span>                                   </span><span class="hs-comment">-- ^ the cmm to generate code for</span><span>
</span><span id="line-540"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>                                          </span><span class="hs-comment">-- ^ sequence number of this top thing</span><span>
</span><span id="line-541"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span>   </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Supply.html#UniqSupply"><span class="hs-identifier hs-type">UniqSupply</span></a></span><span>
</span><span id="line-542"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Monad.html#DwarfFiles"><span class="hs-identifier hs-type">DwarfFiles</span></a></span><span>
</span><span id="line-543"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#NatCmmDecl"><span class="hs-identifier hs-type">NatCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045058"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045059"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">]</span><span>                </span><span class="hs-comment">-- native code</span><span>
</span><span id="line-544"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.CLabel.html#CLabel"><span class="hs-identifier hs-type">CLabel</span></a></span><span class="hs-special">]</span><span>                                  </span><span class="hs-comment">-- things imported by this cmm</span><span>
</span><span id="line-545"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Graph.Stats.html#RegAllocStats"><span class="hs-identifier hs-type">Color.RegAllocStats</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045058"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045059"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-comment">-- stats for the coloring register allocator</span><span>
</span><span id="line-546"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.Base.html#RegAllocStats"><span class="hs-identifier hs-type">Linear.RegAllocStats</span></a></span><span class="hs-special">]</span><span>              </span><span class="hs-comment">-- stats for the linear register allocators</span><span>
</span><span id="line-547"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#LabelMap"><span class="hs-identifier hs-type">LabelMap</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UnwindPoint"><span class="hs-identifier hs-type">UnwindPoint</span></a></span><span class="hs-special">]</span><span>                    </span><span class="hs-comment">-- unwinding information for blocks</span><span>
</span><span id="line-548"></span><span>                </span><span class="hs-special">)</span><span>
</span><span id="line-549"></span><span>
</span><span id="line-550"></span><span id="cmmNativeGen"><span class="annot"><span class="annottext">cmmNativeGen :: forall statics instr jumpDest.
(Instruction instr, Outputable statics, Outputable instr,
 Outputable jumpDest) =&gt;
DynFlags
-&gt; Module
-&gt; ModLocation
-&gt; NcgImpl statics instr jumpDest
-&gt; UniqSupply
-&gt; DwarfFiles
-&gt; LabelMap DebugBlock
-&gt; RawCmmDecl
-&gt; Int
-&gt; IO
     (UniqSupply, DwarfFiles, [NatCmmDecl statics instr], [CLabel],
      Maybe [RegAllocStats statics instr], Maybe [RegAllocStats],
      LabelMap [UnwindPoint])
</span><a href="GHC.CmmToAsm.html#cmmNativeGen"><span class="hs-identifier hs-var hs-var">cmmNativeGen</span></a></span></span><span> </span><span id="local-6989586621681044217"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044217"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681044216"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681044216"><span class="hs-identifier hs-var">this_mod</span></a></span></span><span> </span><span id="local-6989586621681044215"><span class="annot"><span class="annottext">ModLocation
</span><a href="#local-6989586621681044215"><span class="hs-identifier hs-var">modLoc</span></a></span></span><span> </span><span id="local-6989586621681044214"><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
</span><a href="#local-6989586621681044214"><span class="hs-identifier hs-var">ncgImpl</span></a></span></span><span> </span><span id="local-6989586621681044213"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681044213"><span class="hs-identifier hs-var">us</span></a></span></span><span> </span><span id="local-6989586621681044212"><span class="annot"><span class="annottext">DwarfFiles
</span><a href="#local-6989586621681044212"><span class="hs-identifier hs-var">fileIds</span></a></span></span><span> </span><span id="local-6989586621681044211"><span class="annot"><span class="annottext">LabelMap DebugBlock
</span><a href="#local-6989586621681044211"><span class="hs-identifier hs-var">dbgMap</span></a></span></span><span> </span><span id="local-6989586621681044210"><span class="annot"><span class="annottext">RawCmmDecl
</span><a href="#local-6989586621681044210"><span class="hs-identifier hs-var">cmm</span></a></span></span><span> </span><span id="local-6989586621681044209"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681044209"><span class="hs-identifier hs-var">count</span></a></span></span><span>
</span><span id="line-551"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-552"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681044208"><span class="annot"><span class="annottext">config :: NCGConfig
</span><a href="#local-6989586621681044208"><span class="hs-identifier hs-var hs-var">config</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest -&gt; NCGConfig
forall statics instr jumpDest.
NcgImpl statics instr jumpDest -&gt; NCGConfig
</span><a href="GHC.CmmToAsm.Monad.html#ncgConfig"><span class="hs-identifier hs-var hs-var">ncgConfig</span></a></span><span> </span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
</span><a href="#local-6989586621681044214"><span class="hs-identifier hs-var">ncgImpl</span></a></span><span>
</span><span id="line-553"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681044207"><span class="annot"><span class="annottext">platform :: Platform
</span><a href="#local-6989586621681044207"><span class="hs-identifier hs-var hs-var">platform</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NCGConfig -&gt; Platform
</span><a href="GHC.CmmToAsm.Config.html#ncgPlatform"><span class="hs-identifier hs-var hs-var">ncgPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681044208"><span class="hs-identifier hs-var">config</span></a></span><span>
</span><span id="line-554"></span><span>
</span><span id="line-555"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681044206"><span class="annot"><span class="annottext">proc_name :: SDoc
</span><a href="#local-6989586621681044206"><span class="hs-identifier hs-var hs-var">proc_name</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">RawCmmDecl
</span><a href="#local-6989586621681044210"><span class="hs-identifier hs-var">cmm</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-556"></span><span>                </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#CmmProc"><span class="hs-identifier hs-type">CmmProc</span></a></span><span> </span><span class="annot"><span class="annottext">LabelMap RawCmmStatics
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681044204"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681044204"><span class="hs-identifier hs-var">entry_label</span></a></span></span><span> </span><span class="annot"><span class="annottext">[GlobalReg]
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">CmmGraph
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CLabel -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681044204"><span class="hs-identifier hs-var">entry_label</span></a></span><span>
</span><span id="line-557"></span><span>                </span><span class="annot"><span class="annottext">RawCmmDecl
</span><span class="hs-identifier">_</span></span><span>                           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;DataChunk&quot;</span></span><span>
</span><span id="line-558"></span><span>
</span><span id="line-559"></span><span>        </span><span class="hs-comment">-- rewrite assignments to global regs</span><span>
</span><span id="line-560"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681044203"><span class="annot"><span class="annottext">fixed_cmm :: RawCmmDecl
</span><a href="#local-6989586621681044203"><span class="hs-identifier hs-var hs-var">fixed_cmm</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-561"></span><span>                </span><span class="hs-pragma">{-# SCC</span><span> </span><span class="hs-pragma">&quot;fixStgRegisters&quot;</span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-562"></span><span>                </span><span class="annot"><span class="annottext">DynFlags -&gt; RawCmmDecl -&gt; RawCmmDecl
</span><a href="GHC.StgToCmm.CgUtils.html#fixStgRegisters"><span class="hs-identifier hs-var">fixStgRegisters</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044217"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">RawCmmDecl
</span><a href="#local-6989586621681044210"><span class="hs-identifier hs-var">cmm</span></a></span><span>
</span><span id="line-563"></span><span>
</span><span id="line-564"></span><span>        </span><span class="hs-comment">-- cmm to cmm optimisations</span><span>
</span><span id="line-565"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681044202"><span class="annot"><span class="annottext">RawCmmDecl
</span><a href="#local-6989586621681044202"><span class="hs-identifier hs-var">opt_cmm</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681044201"><span class="annot"><span class="annottext">[CLabel]
</span><a href="#local-6989586621681044201"><span class="hs-identifier hs-var">imports</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-566"></span><span>                </span><span class="hs-pragma">{-# SCC</span><span> </span><span class="hs-pragma">&quot;cmmToCmm&quot;</span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-567"></span><span>                </span><span class="annot"><span class="annottext">NCGConfig -&gt; Module -&gt; RawCmmDecl -&gt; (RawCmmDecl, [CLabel])
</span><a href="GHC.CmmToAsm.html#cmmToCmm"><span class="hs-identifier hs-var">cmmToCmm</span></a></span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681044208"><span class="hs-identifier hs-var">config</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681044216"><span class="hs-identifier hs-var">this_mod</span></a></span><span> </span><span class="annot"><span class="annottext">RawCmmDecl
</span><a href="#local-6989586621681044203"><span class="hs-identifier hs-var">fixed_cmm</span></a></span><span>
</span><span id="line-568"></span><span>
</span><span id="line-569"></span><span>        </span><span class="annot"><span class="annottext">DynFlags -&gt; DumpFlag -&gt; String -&gt; DumpFormat -&gt; SDoc -&gt; IO ()
</span><a href="GHC.Utils.Error.html#dumpIfSet_dyn"><span class="hs-identifier hs-var">dumpIfSet_dyn</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044217"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-570"></span><span>                </span><span class="annot"><span class="annottext">DumpFlag
</span><a href="GHC.Driver.Flags.html#Opt_D_dump_opt_cmm"><span class="hs-identifier hs-var">Opt_D_dump_opt_cmm</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Optimised Cmm&quot;</span></span><span> </span><span class="annot"><span class="annottext">DumpFormat
</span><a href="GHC.Utils.Error.html#FormatCMM"><span class="hs-identifier hs-var">FormatCMM</span></a></span><span>
</span><span id="line-571"></span><span>                </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RawCmmGroup -&gt; SDoc
forall d info g.
(Outputable d, Outputable info, Outputable g) =&gt;
GenCmmGroup d info g -&gt; SDoc
</span><a href="GHC.Cmm.Ppr.Decl.html#pprCmmGroup"><span class="hs-identifier hs-var">pprCmmGroup</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">RawCmmDecl
</span><a href="#local-6989586621681044202"><span class="hs-identifier hs-var">opt_cmm</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-572"></span><span>
</span><span id="line-573"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681044196"><span class="annot"><span class="annottext">cmmCfg :: CFG
</span><a href="#local-6989586621681044196"><span class="hs-identifier hs-var hs-var">cmmCfg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-pragma">{-# SCC</span><span> </span><span class="hs-pragma">&quot;getCFG&quot;</span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-574"></span><span>                     </span><span class="annot"><span class="annottext">CfgWeights -&gt; RawCmmDecl -&gt; CFG
</span><a href="GHC.CmmToAsm.CFG.html#getCfgProc"><span class="hs-identifier hs-var">getCfgProc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; CfgWeights
</span><a href="GHC.Driver.Session.html#cfgWeightInfo"><span class="hs-identifier hs-var hs-var">cfgWeightInfo</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044217"><span class="hs-identifier hs-var">dflags</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">RawCmmDecl
</span><a href="#local-6989586621681044202"><span class="hs-identifier hs-var">opt_cmm</span></a></span><span>
</span><span id="line-575"></span><span>
</span><span id="line-576"></span><span>        </span><span class="hs-comment">-- generate native code from cmm</span><span>
</span><span id="line-577"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span id="local-6989586621681044193"><span class="annot"><span class="annottext">[NatCmmDecl statics instr]
</span><a href="#local-6989586621681044193"><span class="hs-identifier hs-var">native</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681044192"><span class="annot"><span class="annottext">[CLabel]
</span><a href="#local-6989586621681044192"><span class="hs-identifier hs-var">lastMinuteImports</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681044191"><span class="annot"><span class="annottext">DwarfFiles
</span><a href="#local-6989586621681044191"><span class="hs-identifier hs-var">fileIds'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681044190"><span class="annot"><span class="annottext">CFG
</span><a href="#local-6989586621681044190"><span class="hs-identifier hs-var">nativeCfgWeights</span></a></span></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span id="local-6989586621681044189"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681044189"><span class="hs-identifier hs-var">usGen</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-578"></span><span>                </span><span class="hs-pragma">{-# SCC</span><span> </span><span class="hs-pragma">&quot;genMachCode&quot;</span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-579"></span><span>                </span><span class="annot"><span class="annottext">UniqSupply
-&gt; UniqSM ([NatCmmDecl statics instr], [CLabel], DwarfFiles, CFG)
-&gt; (([NatCmmDecl statics instr], [CLabel], DwarfFiles, CFG),
    UniqSupply)
forall a. UniqSupply -&gt; UniqSM a -&gt; (a, UniqSupply)
</span><a href="GHC.Types.Unique.Supply.html#initUs"><span class="hs-identifier hs-var">initUs</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681044213"><span class="hs-identifier hs-var">us</span></a></span><span> </span><span class="annot"><span class="annottext">(UniqSM ([NatCmmDecl statics instr], [CLabel], DwarfFiles, CFG)
 -&gt; (([NatCmmDecl statics instr], [CLabel], DwarfFiles, CFG),
     UniqSupply))
-&gt; UniqSM ([NatCmmDecl statics instr], [CLabel], DwarfFiles, CFG)
-&gt; (([NatCmmDecl statics instr], [CLabel], DwarfFiles, CFG),
    UniqSupply)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
-&gt; Module
-&gt; ModLocation
-&gt; (RawCmmDecl -&gt; NatM [NatCmmDecl statics instr])
-&gt; DwarfFiles
-&gt; LabelMap DebugBlock
-&gt; RawCmmDecl
-&gt; CFG
-&gt; UniqSM ([NatCmmDecl statics instr], [CLabel], DwarfFiles, CFG)
forall statics instr.
DynFlags
-&gt; Module
-&gt; ModLocation
-&gt; (RawCmmDecl -&gt; NatM [NatCmmDecl statics instr])
-&gt; DwarfFiles
-&gt; LabelMap DebugBlock
-&gt; RawCmmDecl
-&gt; CFG
-&gt; UniqSM ([NatCmmDecl statics instr], [CLabel], DwarfFiles, CFG)
</span><a href="GHC.CmmToAsm.html#genMachCode"><span class="hs-identifier hs-var">genMachCode</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044217"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681044216"><span class="hs-identifier hs-var">this_mod</span></a></span><span> </span><span class="annot"><span class="annottext">ModLocation
</span><a href="#local-6989586621681044215"><span class="hs-identifier hs-var">modLoc</span></a></span><span>
</span><span id="line-580"></span><span>                                        </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
-&gt; RawCmmDecl -&gt; NatM [NatCmmDecl statics instr]
forall statics instr jumpDest.
NcgImpl statics instr jumpDest
-&gt; RawCmmDecl -&gt; NatM [NatCmmDecl statics instr]
</span><a href="GHC.CmmToAsm.Monad.html#cmmTopCodeGen"><span class="hs-identifier hs-var hs-var">cmmTopCodeGen</span></a></span><span> </span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
</span><a href="#local-6989586621681044214"><span class="hs-identifier hs-var">ncgImpl</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-581"></span><span>                                        </span><span class="annot"><span class="annottext">DwarfFiles
</span><a href="#local-6989586621681044212"><span class="hs-identifier hs-var">fileIds</span></a></span><span> </span><span class="annot"><span class="annottext">LabelMap DebugBlock
</span><a href="#local-6989586621681044211"><span class="hs-identifier hs-var">dbgMap</span></a></span><span> </span><span class="annot"><span class="annottext">RawCmmDecl
</span><a href="#local-6989586621681044202"><span class="hs-identifier hs-var">opt_cmm</span></a></span><span> </span><span class="annot"><span class="annottext">CFG
</span><a href="#local-6989586621681044196"><span class="hs-identifier hs-var">cmmCfg</span></a></span><span>
</span><span id="line-582"></span><span>
</span><span id="line-583"></span><span>        </span><span class="annot"><span class="annottext">DynFlags -&gt; DumpFlag -&gt; String -&gt; DumpFormat -&gt; SDoc -&gt; IO ()
</span><a href="GHC.Utils.Error.html#dumpIfSet_dyn"><span class="hs-identifier hs-var">dumpIfSet_dyn</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044217"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-584"></span><span>                </span><span class="annot"><span class="annottext">DumpFlag
</span><a href="GHC.Driver.Flags.html#Opt_D_dump_asm_native"><span class="hs-identifier hs-var">Opt_D_dump_asm_native</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Native code&quot;</span></span><span> </span><span class="annot"><span class="annottext">DumpFormat
</span><a href="GHC.Utils.Error.html#FormatASM"><span class="hs-identifier hs-var">FormatASM</span></a></span><span>
</span><span id="line-585"></span><span>                </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="annot"><span class="annottext">([SDoc] -&gt; SDoc) -&gt; [SDoc] -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(NatCmmDecl statics instr -&gt; SDoc)
-&gt; [NatCmmDecl statics instr] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest -&gt; NatCmmDecl statics instr -&gt; SDoc
forall statics instr jumpDest.
NcgImpl statics instr jumpDest -&gt; NatCmmDecl statics instr -&gt; SDoc
</span><a href="GHC.CmmToAsm.Monad.html#pprNatCmmDecl"><span class="hs-identifier hs-var hs-var">pprNatCmmDecl</span></a></span><span> </span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
</span><a href="#local-6989586621681044214"><span class="hs-identifier hs-var">ncgImpl</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[NatCmmDecl statics instr]
</span><a href="#local-6989586621681044193"><span class="hs-identifier hs-var">native</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-586"></span><span>
</span><span id="line-587"></span><span>        </span><span class="annot"><span class="annottext">DynFlags -&gt; Maybe CFG -&gt; String -&gt; SDoc -&gt; IO ()
</span><a href="GHC.CmmToAsm.html#maybeDumpCfg"><span class="hs-identifier hs-var">maybeDumpCfg</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044217"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CFG -&gt; Maybe CFG
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">CFG
</span><a href="#local-6989586621681044190"><span class="hs-identifier hs-var">nativeCfgWeights</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;CFG Weights - Native&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681044206"><span class="hs-identifier hs-var">proc_name</span></a></span><span>
</span><span id="line-588"></span><span>
</span><span id="line-589"></span><span>        </span><span class="hs-comment">-- tag instructions with register liveness information</span><span>
</span><span id="line-590"></span><span>        </span><span class="hs-comment">-- also drops dead code. We don't keep the cfg in sync on</span><span>
</span><span id="line-591"></span><span>        </span><span class="hs-comment">-- some backends, so don't use it there.</span><span>
</span><span id="line-592"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681044184"><span class="annot"><span class="annottext">livenessCfg :: Maybe CFG
</span><a href="#local-6989586621681044184"><span class="hs-identifier hs-var hs-var">livenessCfg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Bool
</span><a href="GHC.CmmToAsm.BlockLayout.html#backendMaintainsCfg"><span class="hs-identifier hs-var">backendMaintainsCfg</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681044207"><span class="hs-identifier hs-var">platform</span></a></span><span>
</span><span id="line-593"></span><span>                                </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">CFG -&gt; Maybe CFG
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">CFG
</span><a href="#local-6989586621681044190"><span class="hs-identifier hs-var">nativeCfgWeights</span></a></span><span>
</span><span id="line-594"></span><span>                                </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Maybe CFG
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-595"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681044182"><span class="annot"><span class="annottext">[LiveCmmDecl statics instr]
</span><a href="#local-6989586621681044182"><span class="hs-identifier hs-var">withLiveness</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681044181"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681044181"><span class="hs-identifier hs-var">usLive</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-596"></span><span>                </span><span class="hs-pragma">{-# SCC</span><span> </span><span class="hs-pragma">&quot;regLiveness&quot;</span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-597"></span><span>                </span><span class="annot"><span class="annottext">UniqSupply
-&gt; UniqSM [LiveCmmDecl statics instr]
-&gt; ([LiveCmmDecl statics instr], UniqSupply)
forall a. UniqSupply -&gt; UniqSM a -&gt; (a, UniqSupply)
</span><a href="GHC.Types.Unique.Supply.html#initUs"><span class="hs-identifier hs-var">initUs</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681044189"><span class="hs-identifier hs-var">usGen</span></a></span><span>
</span><span id="line-598"></span><span>                        </span><span class="annot"><span class="annottext">(UniqSM [LiveCmmDecl statics instr]
 -&gt; ([LiveCmmDecl statics instr], UniqSupply))
-&gt; UniqSM [LiveCmmDecl statics instr]
-&gt; ([LiveCmmDecl statics instr], UniqSupply)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(NatCmmDecl statics instr -&gt; UniqSM (LiveCmmDecl statics instr))
-&gt; [NatCmmDecl statics instr] -&gt; UniqSM [LiveCmmDecl statics instr]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe CFG
-&gt; Platform
-&gt; NatCmmDecl statics instr
-&gt; UniqSM (LiveCmmDecl statics instr)
forall instr statics.
(Outputable instr, Instruction instr) =&gt;
Maybe CFG
-&gt; Platform
-&gt; NatCmmDecl statics instr
-&gt; UniqSM (LiveCmmDecl statics instr)
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#cmmTopLiveness"><span class="hs-identifier hs-var">cmmTopLiveness</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe CFG
</span><a href="#local-6989586621681044184"><span class="hs-identifier hs-var">livenessCfg</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681044207"><span class="hs-identifier hs-var">platform</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[NatCmmDecl statics instr]
</span><a href="#local-6989586621681044193"><span class="hs-identifier hs-var">native</span></a></span><span>
</span><span id="line-599"></span><span>
</span><span id="line-600"></span><span>        </span><span class="annot"><span class="annottext">DynFlags -&gt; DumpFlag -&gt; String -&gt; DumpFormat -&gt; SDoc -&gt; IO ()
</span><a href="GHC.Utils.Error.html#dumpIfSet_dyn"><span class="hs-identifier hs-var">dumpIfSet_dyn</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044217"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-601"></span><span>                </span><span class="annot"><span class="annottext">DumpFlag
</span><a href="GHC.Driver.Flags.html#Opt_D_dump_asm_liveness"><span class="hs-identifier hs-var">Opt_D_dump_asm_liveness</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Liveness annotations added&quot;</span></span><span>
</span><span id="line-602"></span><span>                </span><span class="annot"><span class="annottext">DumpFormat
</span><a href="GHC.Utils.Error.html#FormatCMM"><span class="hs-identifier hs-var">FormatCMM</span></a></span><span>
</span><span id="line-603"></span><span>                </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="annot"><span class="annottext">([SDoc] -&gt; SDoc) -&gt; [SDoc] -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(LiveCmmDecl statics instr -&gt; SDoc)
-&gt; [LiveCmmDecl statics instr] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">LiveCmmDecl statics instr -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">[LiveCmmDecl statics instr]
</span><a href="#local-6989586621681044182"><span class="hs-identifier hs-var">withLiveness</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-604"></span><span>
</span><span id="line-605"></span><span>        </span><span class="hs-comment">-- allocate registers</span><span>
</span><span id="line-606"></span><span>        </span><span class="hs-special">(</span><span id="local-6989586621681044177"><span class="annot"><span class="annottext">[NatCmmDecl statics instr]
</span><a href="#local-6989586621681044177"><span class="hs-identifier hs-var">alloced</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681044176"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681044176"><span class="hs-identifier hs-var">usAlloc</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681044175"><span class="annot"><span class="annottext">Maybe [RegAllocStats statics instr]
</span><a href="#local-6989586621681044175"><span class="hs-identifier hs-var">ppr_raStatsColor</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681044174"><span class="annot"><span class="annottext">Maybe [RegAllocStats]
</span><a href="#local-6989586621681044174"><span class="hs-identifier hs-var">ppr_raStatsLinear</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681044173"><span class="annot"><span class="annottext">[RegAllocStats]
</span><a href="#local-6989586621681044173"><span class="hs-identifier hs-var">raStats</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681044172"><span class="annot"><span class="annottext">[(BlockId, BlockId)]
</span><a href="#local-6989586621681044172"><span class="hs-identifier hs-var">stack_updt_blks</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span>
</span><span id="line-607"></span><span>         </span><span class="hs-keyword">if</span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><span class="annottext">GeneralFlag -&gt; DynFlags -&gt; Bool
</span><a href="GHC.Driver.Session.html#gopt"><span class="hs-identifier hs-var">gopt</span></a></span><span> </span><span class="annot"><span class="annottext">GeneralFlag
</span><a href="GHC.Driver.Flags.html#Opt_RegsGraph"><span class="hs-identifier hs-var">Opt_RegsGraph</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044217"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-608"></span><span>           </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">GeneralFlag -&gt; DynFlags -&gt; Bool
</span><a href="GHC.Driver.Session.html#gopt"><span class="hs-identifier hs-var">gopt</span></a></span><span> </span><span class="annot"><span class="annottext">GeneralFlag
</span><a href="GHC.Driver.Flags.html#Opt_RegsIterative"><span class="hs-identifier hs-var">Opt_RegsIterative</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044217"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-609"></span><span>          </span><span class="hs-keyword">then</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-610"></span><span>                </span><span class="hs-comment">-- the regs usable for allocation</span><span>
</span><span id="line-611"></span><span>                </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681044167"><span class="annot"><span class="annottext">UniqFM RegClass (UniqSet RealReg)
</span><a href="#local-6989586621681044167"><span class="hs-identifier hs-var">alloc_regs</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.FM.html#UniqFM"><span class="hs-identifier hs-type">UniqFM</span></a></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.Class.html#RegClass"><span class="hs-identifier hs-type">RegClass</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Unique.Set.html#UniqSet"><span class="hs-identifier hs-type">UniqSet</span></a></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#RealReg"><span class="hs-identifier hs-type">RealReg</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-612"></span><span>                        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(RealReg
 -&gt; UniqFM RegClass (UniqSet RealReg)
 -&gt; UniqFM RegClass (UniqSet RealReg))
-&gt; UniqFM RegClass (UniqSet RealReg)
-&gt; [RealReg]
-&gt; UniqFM RegClass (UniqSet RealReg)
forall (t :: * -&gt; *) a b.
Foldable t =&gt;
(a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621681044165"><span class="annot"><span class="annottext">RealReg
</span><a href="#local-6989586621681044165"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(UniqSet RealReg -&gt; UniqSet RealReg -&gt; UniqSet RealReg)
-&gt; UniqFM RegClass (UniqSet RealReg)
-&gt; UniqFM RegClass (UniqSet RealReg)
-&gt; UniqFM RegClass (UniqSet RealReg)
forall elt key.
(elt -&gt; elt -&gt; elt)
-&gt; UniqFM key elt -&gt; UniqFM key elt -&gt; UniqFM key elt
</span><a href="GHC.Types.Unique.FM.html#plusUFM_C"><span class="hs-identifier hs-var">plusUFM_C</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSet RealReg -&gt; UniqSet RealReg -&gt; UniqSet RealReg
forall a. UniqSet a -&gt; UniqSet a -&gt; UniqSet a
</span><a href="GHC.Types.Unique.Set.html#unionUniqSets"><span class="hs-identifier hs-var">unionUniqSets</span></a></span><span>
</span><span id="line-613"></span><span>                                        </span><span class="annot"><span class="annottext">(UniqFM RegClass (UniqSet RealReg)
 -&gt; UniqFM RegClass (UniqSet RealReg)
 -&gt; UniqFM RegClass (UniqSet RealReg))
-&gt; UniqFM RegClass (UniqSet RealReg)
-&gt; UniqFM RegClass (UniqSet RealReg)
-&gt; UniqFM RegClass (UniqSet RealReg)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">RegClass -&gt; UniqSet RealReg -&gt; UniqFM RegClass (UniqSet RealReg)
forall key elt. Uniquable key =&gt; key -&gt; elt -&gt; UniqFM key elt
</span><a href="GHC.Types.Unique.FM.html#unitUFM"><span class="hs-identifier hs-var">unitUFM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; RealReg -&gt; RegClass
</span><a href="GHC.CmmToAsm.Reg.Target.html#targetClassOfRealReg"><span class="hs-identifier hs-var">targetClassOfRealReg</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681044207"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">RealReg
</span><a href="#local-6989586621681044165"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RealReg -&gt; UniqSet RealReg
forall a. Uniquable a =&gt; a -&gt; UniqSet a
</span><a href="GHC.Types.Unique.Set.html#unitUniqSet"><span class="hs-identifier hs-var">unitUniqSet</span></a></span><span> </span><span class="annot"><span class="annottext">RealReg
</span><a href="#local-6989586621681044165"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-614"></span><span>                                </span><span class="annot"><span class="annottext">UniqFM RegClass (UniqSet RealReg)
forall key elt. UniqFM key elt
</span><a href="GHC.Types.Unique.FM.html#emptyUFM"><span class="hs-identifier hs-var">emptyUFM</span></a></span><span>
</span><span id="line-615"></span><span>                        </span><span class="annot"><span class="annottext">([RealReg] -&gt; UniqFM RegClass (UniqSet RealReg))
-&gt; [RealReg] -&gt; UniqFM RegClass (UniqSet RealReg)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest -&gt; [RealReg]
forall statics instr jumpDest.
NcgImpl statics instr jumpDest -&gt; [RealReg]
</span><a href="GHC.CmmToAsm.Monad.html#allocatableRegs"><span class="hs-identifier hs-var hs-var">allocatableRegs</span></a></span><span> </span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
</span><a href="#local-6989586621681044214"><span class="hs-identifier hs-var">ncgImpl</span></a></span><span>
</span><span id="line-616"></span><span>
</span><span id="line-617"></span><span>                </span><span class="hs-comment">-- do the graph coloring register allocation</span><span>
</span><span id="line-618"></span><span>                </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span id="local-6989586621681044159"><span class="annot"><span class="annottext">[NatCmmDecl statics instr]
</span><a href="#local-6989586621681044159"><span class="hs-identifier hs-var">alloced</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681044158"><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621681044158"><span class="hs-identifier hs-var">maybe_more_stack</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681044157"><span class="annot"><span class="annottext">[RegAllocStats statics instr]
</span><a href="#local-6989586621681044157"><span class="hs-identifier hs-var">regAllocStats</span></a></span></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span id="local-6989586621681044156"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681044156"><span class="hs-identifier hs-var">usAlloc</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-619"></span><span>                        </span><span class="hs-glyph">=</span><span> </span><span class="hs-pragma">{-# SCC</span><span> </span><span class="hs-pragma">&quot;RegAlloc-color&quot;</span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-620"></span><span>                          </span><span class="annot"><span class="annottext">UniqSupply
-&gt; UniqSM
     ([NatCmmDecl statics instr], Maybe Int,
      [RegAllocStats statics instr])
-&gt; (([NatCmmDecl statics instr], Maybe Int,
     [RegAllocStats statics instr]),
    UniqSupply)
forall a. UniqSupply -&gt; UniqSM a -&gt; (a, UniqSupply)
</span><a href="GHC.Types.Unique.Supply.html#initUs"><span class="hs-identifier hs-var">initUs</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681044181"><span class="hs-identifier hs-var">usLive</span></a></span><span>
</span><span id="line-621"></span><span>                          </span><span class="annot"><span class="annottext">(UniqSM
   ([NatCmmDecl statics instr], Maybe Int,
    [RegAllocStats statics instr])
 -&gt; (([NatCmmDecl statics instr], Maybe Int,
      [RegAllocStats statics instr]),
     UniqSupply))
-&gt; UniqSM
     ([NatCmmDecl statics instr], Maybe Int,
      [RegAllocStats statics instr])
-&gt; (([NatCmmDecl statics instr], Maybe Int,
     [RegAllocStats statics instr]),
    UniqSupply)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">NCGConfig
-&gt; UniqFM RegClass (UniqSet RealReg)
-&gt; UniqSet Int
-&gt; Int
-&gt; [LiveCmmDecl statics instr]
-&gt; Maybe CFG
-&gt; UniqSM
     ([NatCmmDecl statics instr], Maybe Int,
      [RegAllocStats statics instr])
forall statics instr.
(Outputable statics, Outputable instr, Instruction instr) =&gt;
NCGConfig
-&gt; UniqFM RegClass (UniqSet RealReg)
-&gt; UniqSet Int
-&gt; Int
-&gt; [LiveCmmDecl statics instr]
-&gt; Maybe CFG
-&gt; UniqSM
     ([NatCmmDecl statics instr], Maybe Int,
      [RegAllocStats statics instr])
</span><a href="GHC.CmmToAsm.Reg.Graph.html#regAlloc"><span class="hs-identifier hs-var">Color.regAlloc</span></a></span><span>
</span><span id="line-622"></span><span>                                </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681044208"><span class="hs-identifier hs-var">config</span></a></span><span>
</span><span id="line-623"></span><span>                                </span><span class="annot"><span class="annottext">UniqFM RegClass (UniqSet RealReg)
</span><a href="#local-6989586621681044167"><span class="hs-identifier hs-var">alloc_regs</span></a></span><span>
</span><span id="line-624"></span><span>                                </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Int] -&gt; UniqSet Int
forall a. Uniquable a =&gt; [a] -&gt; UniqSet a
</span><a href="GHC.Types.Unique.Set.html#mkUniqSet"><span class="hs-identifier hs-var">mkUniqSet</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-glyph">..</span><span> </span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest -&gt; Int
forall statics instr jumpDest.
NcgImpl statics instr jumpDest -&gt; Int
</span><a href="GHC.CmmToAsm.Monad.html#maxSpillSlots"><span class="hs-identifier hs-var hs-var">maxSpillSlots</span></a></span><span> </span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
</span><a href="#local-6989586621681044214"><span class="hs-identifier hs-var">ncgImpl</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-625"></span><span>                                </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest -&gt; Int
forall statics instr jumpDest.
NcgImpl statics instr jumpDest -&gt; Int
</span><a href="GHC.CmmToAsm.Monad.html#maxSpillSlots"><span class="hs-identifier hs-var hs-var">maxSpillSlots</span></a></span><span> </span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
</span><a href="#local-6989586621681044214"><span class="hs-identifier hs-var">ncgImpl</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-626"></span><span>                                </span><span class="annot"><span class="annottext">[LiveCmmDecl statics instr]
</span><a href="#local-6989586621681044182"><span class="hs-identifier hs-var">withLiveness</span></a></span><span>
</span><span id="line-627"></span><span>                                </span><span class="annot"><span class="annottext">Maybe CFG
</span><a href="#local-6989586621681044184"><span class="hs-identifier hs-var">livenessCfg</span></a></span><span>
</span><span id="line-628"></span><span>
</span><span id="line-629"></span><span>                </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span id="local-6989586621681044153"><span class="annot"><span class="annottext">[NatCmmDecl statics instr]
</span><a href="#local-6989586621681044153"><span class="hs-identifier hs-var">alloced'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681044152"><span class="annot"><span class="annottext">[(BlockId, BlockId)]
</span><a href="#local-6989586621681044152"><span class="hs-identifier hs-var">stack_updt_blks</span></a></span></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span id="local-6989586621681044151"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681044151"><span class="hs-identifier hs-var">usAlloc'</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-630"></span><span>                        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqSupply
-&gt; UniqSM ([NatCmmDecl statics instr], [(BlockId, BlockId)])
-&gt; (([NatCmmDecl statics instr], [(BlockId, BlockId)]), UniqSupply)
forall a. UniqSupply -&gt; UniqSM a -&gt; (a, UniqSupply)
</span><a href="GHC.Types.Unique.Supply.html#initUs"><span class="hs-identifier hs-var">initUs</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681044156"><span class="hs-identifier hs-var">usAlloc</span></a></span><span> </span><span class="annot"><span class="annottext">(UniqSM ([NatCmmDecl statics instr], [(BlockId, BlockId)])
 -&gt; (([NatCmmDecl statics instr], [(BlockId, BlockId)]),
     UniqSupply))
-&gt; UniqSM ([NatCmmDecl statics instr], [(BlockId, BlockId)])
-&gt; (([NatCmmDecl statics instr], [(BlockId, BlockId)]), UniqSupply)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-631"></span><span>                                </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621681044158"><span class="hs-identifier hs-var">maybe_more_stack</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-632"></span><span>                                </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">([NatCmmDecl statics instr], [(BlockId, BlockId)])
-&gt; UniqSM ([NatCmmDecl statics instr], [(BlockId, BlockId)])
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[NatCmmDecl statics instr]
</span><a href="#local-6989586621681044159"><span class="hs-identifier hs-var">alloced</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-633"></span><span>                                </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681044150"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681044150"><span class="hs-identifier hs-var">amount</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-634"></span><span>                                    </span><span class="hs-special">(</span><span id="local-6989586621681044149"><span class="annot"><span class="annottext">[NatCmmDecl statics instr]
</span><a href="#local-6989586621681044149"><span class="hs-identifier hs-var">alloced'</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621681044148"><span class="annot"><span class="annottext">[[(BlockId, BlockId)]]
</span><a href="#local-6989586621681044148"><span class="hs-identifier hs-var">stack_updt_blks</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[(NatCmmDecl statics instr, [(BlockId, BlockId)])]
-&gt; ([NatCmmDecl statics instr], [[(BlockId, BlockId)]])
forall a b. [(a, b)] -&gt; ([a], [b])
</span><a href="../../base/src/GHC.List.html#unzip"><span class="hs-identifier hs-var">unzip</span></a></span><span> </span><span class="annot"><span class="annottext">([(NatCmmDecl statics instr, [(BlockId, BlockId)])]
 -&gt; ([NatCmmDecl statics instr], [[(BlockId, BlockId)]]))
-&gt; UniqSM [(NatCmmDecl statics instr, [(BlockId, BlockId)])]
-&gt; UniqSM ([NatCmmDecl statics instr], [[(BlockId, BlockId)]])
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span>
</span><span id="line-635"></span><span>                                                </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(NatCmmDecl statics instr
 -&gt; UniqSM (NatCmmDecl statics instr, [(BlockId, BlockId)]))
-&gt; [NatCmmDecl statics instr]
-&gt; UniqSM [(NatCmmDecl statics instr, [(BlockId, BlockId)])]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
-&gt; Int
-&gt; NatCmmDecl statics instr
-&gt; UniqSM (NatCmmDecl statics instr, [(BlockId, BlockId)])
forall statics instr jumpDest.
NcgImpl statics instr jumpDest
-&gt; Int
-&gt; NatCmmDecl statics instr
-&gt; UniqSM (NatCmmDecl statics instr, [(BlockId, BlockId)])
</span><a href="GHC.CmmToAsm.Monad.html#ncgAllocMoreStack"><span class="hs-identifier hs-var hs-var">ncgAllocMoreStack</span></a></span><span> </span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
</span><a href="#local-6989586621681044214"><span class="hs-identifier hs-var">ncgImpl</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681044150"><span class="hs-identifier hs-var">amount</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[NatCmmDecl statics instr]
</span><a href="#local-6989586621681044159"><span class="hs-identifier hs-var">alloced</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-636"></span><span>                                    </span><span class="annot"><span class="annottext">([NatCmmDecl statics instr], [(BlockId, BlockId)])
-&gt; UniqSM ([NatCmmDecl statics instr], [(BlockId, BlockId)])
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[NatCmmDecl statics instr]
</span><a href="#local-6989586621681044149"><span class="hs-identifier hs-var">alloced'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[[(BlockId, BlockId)]] -&gt; [(BlockId, BlockId)]
forall (t :: * -&gt; *) a. Foldable t =&gt; t [a] -&gt; [a]
</span><a href="../../base/src/Data.Foldable.html#concat"><span class="hs-identifier hs-var">concat</span></a></span><span> </span><span class="annot"><span class="annottext">[[(BlockId, BlockId)]]
</span><a href="#local-6989586621681044148"><span class="hs-identifier hs-var">stack_updt_blks</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-637"></span><span>
</span><span id="line-638"></span><span>
</span><span id="line-639"></span><span>                </span><span class="hs-comment">-- dump out what happened during register allocation</span><span>
</span><span id="line-640"></span><span>                </span><span class="annot"><span class="annottext">DynFlags -&gt; DumpFlag -&gt; String -&gt; DumpFormat -&gt; SDoc -&gt; IO ()
</span><a href="GHC.Utils.Error.html#dumpIfSet_dyn"><span class="hs-identifier hs-var">dumpIfSet_dyn</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044217"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-641"></span><span>                        </span><span class="annot"><span class="annottext">DumpFlag
</span><a href="GHC.Driver.Flags.html#Opt_D_dump_asm_regalloc"><span class="hs-identifier hs-var">Opt_D_dump_asm_regalloc</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Registers allocated&quot;</span></span><span>
</span><span id="line-642"></span><span>                        </span><span class="annot"><span class="annottext">DumpFormat
</span><a href="GHC.Utils.Error.html#FormatCMM"><span class="hs-identifier hs-var">FormatCMM</span></a></span><span>
</span><span id="line-643"></span><span>                        </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="annot"><span class="annottext">([SDoc] -&gt; SDoc) -&gt; [SDoc] -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(NatCmmDecl statics instr -&gt; SDoc)
-&gt; [NatCmmDecl statics instr] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest -&gt; NatCmmDecl statics instr -&gt; SDoc
forall statics instr jumpDest.
NcgImpl statics instr jumpDest -&gt; NatCmmDecl statics instr -&gt; SDoc
</span><a href="GHC.CmmToAsm.Monad.html#pprNatCmmDecl"><span class="hs-identifier hs-var hs-var">pprNatCmmDecl</span></a></span><span> </span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
</span><a href="#local-6989586621681044214"><span class="hs-identifier hs-var">ncgImpl</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[NatCmmDecl statics instr]
</span><a href="#local-6989586621681044159"><span class="hs-identifier hs-var">alloced</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-644"></span><span>
</span><span id="line-645"></span><span>                </span><span class="annot"><span class="annottext">DynFlags -&gt; DumpFlag -&gt; String -&gt; DumpFormat -&gt; SDoc -&gt; IO ()
</span><a href="GHC.Utils.Error.html#dumpIfSet_dyn"><span class="hs-identifier hs-var">dumpIfSet_dyn</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044217"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-646"></span><span>                        </span><span class="annot"><span class="annottext">DumpFlag
</span><a href="GHC.Driver.Flags.html#Opt_D_dump_asm_regalloc_stages"><span class="hs-identifier hs-var">Opt_D_dump_asm_regalloc_stages</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Build/spill stages&quot;</span></span><span>
</span><span id="line-647"></span><span>                        </span><span class="annot"><span class="annottext">DumpFormat
</span><a href="GHC.Utils.Error.html#FormatText"><span class="hs-identifier hs-var">FormatText</span></a></span><span>
</span><span id="line-648"></span><span>                        </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span>   </span><span class="annot"><span class="annottext">([SDoc] -&gt; SDoc) -&gt; [SDoc] -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">((Int, RegAllocStats statics instr) -&gt; SDoc)
-&gt; [(Int, RegAllocStats statics instr)] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span id="local-6989586621681044143"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681044143"><span class="hs-identifier hs-var">stage</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681044142"><span class="annot"><span class="annottext">RegAllocStats statics instr
</span><a href="#local-6989586621681044142"><span class="hs-identifier hs-var">stats</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-649"></span><span>                                        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;# --------------------------&quot;</span></span><span>
</span><span id="line-650"></span><span>                                        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;#  cmm &quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#int"><span class="hs-identifier hs-var">int</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681044209"><span class="hs-identifier hs-var">count</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; Stage &quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#int"><span class="hs-identifier hs-var">int</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681044143"><span class="hs-identifier hs-var">stage</span></a></span><span>
</span><span id="line-651"></span><span>                                        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">RegAllocStats statics instr -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">RegAllocStats statics instr
</span><a href="#local-6989586621681044142"><span class="hs-identifier hs-var">stats</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-652"></span><span>                                </span><span class="annot"><span class="annottext">([(Int, RegAllocStats statics instr)] -&gt; [SDoc])
-&gt; [(Int, RegAllocStats statics instr)] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[Int]
-&gt; [RegAllocStats statics instr]
-&gt; [(Int, RegAllocStats statics instr)]
forall a b. [a] -&gt; [b] -&gt; [(a, b)]
</span><a href="../../base/src/GHC.List.html#zip"><span class="hs-identifier hs-var">zip</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-glyph">..</span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">[RegAllocStats statics instr]
</span><a href="#local-6989586621681044157"><span class="hs-identifier hs-var">regAllocStats</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-653"></span><span>
</span><span id="line-654"></span><span>                </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681044139"><span class="annot"><span class="annottext">mPprStats :: Maybe [RegAllocStats statics instr]
</span><a href="#local-6989586621681044139"><span class="hs-identifier hs-var hs-var">mPprStats</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-655"></span><span>                        </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">DumpFlag -&gt; DynFlags -&gt; Bool
</span><a href="GHC.Driver.Session.html#dopt"><span class="hs-identifier hs-var">dopt</span></a></span><span> </span><span class="annot"><span class="annottext">DumpFlag
</span><a href="GHC.Driver.Flags.html#Opt_D_dump_asm_stats"><span class="hs-identifier hs-var">Opt_D_dump_asm_stats</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044217"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-656"></span><span>                         </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">[RegAllocStats statics instr]
-&gt; Maybe [RegAllocStats statics instr]
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">[RegAllocStats statics instr]
</span><a href="#local-6989586621681044157"><span class="hs-identifier hs-var">regAllocStats</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Maybe [RegAllocStats statics instr]
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-657"></span><span>
</span><span id="line-658"></span><span>                </span><span class="hs-comment">-- force evaluation of the Maybe to avoid space leak</span><span>
</span><span id="line-659"></span><span>                </span><span class="annot"><span class="annottext">Maybe [RegAllocStats statics instr]
</span><a href="#local-6989586621681044139"><span class="hs-identifier hs-var">mPprStats</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe [RegAllocStats statics instr] -&gt; IO () -&gt; IO ()
</span><span class="hs-operator hs-var">`seq`</span></span><span> </span><span class="annot"><span class="annottext">() -&gt; IO ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-660"></span><span>
</span><span id="line-661"></span><span>                </span><span class="annot"><span class="annottext">([NatCmmDecl statics instr], UniqSupply,
 Maybe [RegAllocStats statics instr], Maybe [RegAllocStats],
 [RegAllocStats], [(BlockId, BlockId)])
-&gt; IO
     ([NatCmmDecl statics instr], UniqSupply,
      Maybe [RegAllocStats statics instr], Maybe [RegAllocStats],
      [RegAllocStats], [(BlockId, BlockId)])
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span>  </span><span class="hs-special">(</span><span> </span><span class="annot"><span class="annottext">[NatCmmDecl statics instr]
</span><a href="#local-6989586621681044153"><span class="hs-identifier hs-var">alloced'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681044151"><span class="hs-identifier hs-var">usAlloc'</span></a></span><span>
</span><span id="line-662"></span><span>                        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe [RegAllocStats statics instr]
</span><a href="#local-6989586621681044139"><span class="hs-identifier hs-var">mPprStats</span></a></span><span>
</span><span id="line-663"></span><span>                        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe [RegAllocStats]
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-664"></span><span>                        </span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[(BlockId, BlockId)]
</span><a href="#local-6989586621681044152"><span class="hs-identifier hs-var">stack_updt_blks</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-665"></span><span>
</span><span id="line-666"></span><span>          </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-667"></span><span>                </span><span class="hs-comment">-- do linear register allocation</span><span>
</span><span id="line-668"></span><span>                </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681044138"><span class="annot"><span class="annottext">reg_alloc :: LiveCmmDecl statics instr
-&gt; UniqSM
     (NatCmmDecl statics instr, Maybe RegAllocStats,
      [(BlockId, BlockId)])
</span><a href="#local-6989586621681044138"><span class="hs-identifier hs-var hs-var">reg_alloc</span></a></span></span><span> </span><span id="local-6989586621681044137"><span class="annot"><span class="annottext">LiveCmmDecl statics instr
</span><a href="#local-6989586621681044137"><span class="hs-identifier hs-var">proc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-669"></span><span>                       </span><span class="hs-special">(</span><span id="local-6989586621681044136"><span class="annot"><span class="annottext">NatCmmDecl statics instr
</span><a href="#local-6989586621681044136"><span class="hs-identifier hs-var">alloced</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681044135"><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621681044135"><span class="hs-identifier hs-var">maybe_more_stack</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681044134"><span class="annot"><span class="annottext">Maybe RegAllocStats
</span><a href="#local-6989586621681044134"><span class="hs-identifier hs-var">ra_stats</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span>
</span><span id="line-670"></span><span>                               </span><span class="annot"><span class="annottext">NCGConfig
-&gt; LiveCmmDecl statics instr
-&gt; UniqSM
     (NatCmmDecl statics instr, Maybe Int, Maybe RegAllocStats)
forall instr statics.
(Outputable instr, Instruction instr) =&gt;
NCGConfig
-&gt; LiveCmmDecl statics instr
-&gt; UniqSM
     (NatCmmDecl statics instr, Maybe Int, Maybe RegAllocStats)
</span><a href="GHC.CmmToAsm.Reg.Linear.html#regAlloc"><span class="hs-identifier hs-var">Linear.regAlloc</span></a></span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681044208"><span class="hs-identifier hs-var">config</span></a></span><span> </span><span class="annot"><span class="annottext">LiveCmmDecl statics instr
</span><a href="#local-6989586621681044137"><span class="hs-identifier hs-var">proc</span></a></span><span>
</span><span id="line-671"></span><span>                       </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621681044135"><span class="hs-identifier hs-var">maybe_more_stack</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-672"></span><span>                         </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(NatCmmDecl statics instr, Maybe RegAllocStats,
 [(BlockId, BlockId)])
-&gt; UniqSM
     (NatCmmDecl statics instr, Maybe RegAllocStats,
      [(BlockId, BlockId)])
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><span class="annottext">NatCmmDecl statics instr
</span><a href="#local-6989586621681044136"><span class="hs-identifier hs-var">alloced</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe RegAllocStats
</span><a href="#local-6989586621681044134"><span class="hs-identifier hs-var">ra_stats</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-673"></span><span>                         </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681044132"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681044132"><span class="hs-identifier hs-var">amount</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-674"></span><span>                           </span><span class="hs-special">(</span><span id="local-6989586621681044131"><span class="annot"><span class="annottext">NatCmmDecl statics instr
</span><a href="#local-6989586621681044131"><span class="hs-identifier hs-var">alloced'</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621681044130"><span class="annot"><span class="annottext">[(BlockId, BlockId)]
</span><a href="#local-6989586621681044130"><span class="hs-identifier hs-var">stack_updt_blks</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span>
</span><span id="line-675"></span><span>                               </span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
-&gt; Int
-&gt; NatCmmDecl statics instr
-&gt; UniqSM (NatCmmDecl statics instr, [(BlockId, BlockId)])
forall statics instr jumpDest.
NcgImpl statics instr jumpDest
-&gt; Int
-&gt; NatCmmDecl statics instr
-&gt; UniqSM (NatCmmDecl statics instr, [(BlockId, BlockId)])
</span><a href="GHC.CmmToAsm.Monad.html#ncgAllocMoreStack"><span class="hs-identifier hs-var hs-var">ncgAllocMoreStack</span></a></span><span> </span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
</span><a href="#local-6989586621681044214"><span class="hs-identifier hs-var">ncgImpl</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681044132"><span class="hs-identifier hs-var">amount</span></a></span><span> </span><span class="annot"><span class="annottext">NatCmmDecl statics instr
</span><a href="#local-6989586621681044136"><span class="hs-identifier hs-var">alloced</span></a></span><span>
</span><span id="line-676"></span><span>                           </span><span class="annot"><span class="annottext">(NatCmmDecl statics instr, Maybe RegAllocStats,
 [(BlockId, BlockId)])
-&gt; UniqSM
     (NatCmmDecl statics instr, Maybe RegAllocStats,
      [(BlockId, BlockId)])
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NatCmmDecl statics instr
</span><a href="#local-6989586621681044131"><span class="hs-identifier hs-var">alloced'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe RegAllocStats
</span><a href="#local-6989586621681044134"><span class="hs-identifier hs-var">ra_stats</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[(BlockId, BlockId)]
</span><a href="#local-6989586621681044130"><span class="hs-identifier hs-var">stack_updt_blks</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-677"></span><span>
</span><span id="line-678"></span><span>                </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span id="local-6989586621681044129"><span class="annot"><span class="annottext">[NatCmmDecl statics instr]
</span><a href="#local-6989586621681044129"><span class="hs-identifier hs-var">alloced</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681044128"><span class="annot"><span class="annottext">[Maybe RegAllocStats]
</span><a href="#local-6989586621681044128"><span class="hs-identifier hs-var">regAllocStats</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681044127"><span class="annot"><span class="annottext">[[(BlockId, BlockId)]]
</span><a href="#local-6989586621681044127"><span class="hs-identifier hs-var">stack_updt_blks</span></a></span></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span id="local-6989586621681044126"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681044126"><span class="hs-identifier hs-var">usAlloc</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-679"></span><span>                        </span><span class="hs-glyph">=</span><span> </span><span class="hs-pragma">{-# SCC</span><span> </span><span class="hs-pragma">&quot;RegAlloc-linear&quot;</span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-680"></span><span>                          </span><span class="annot"><span class="annottext">UniqSupply
-&gt; UniqSM
     ([NatCmmDecl statics instr], [Maybe RegAllocStats],
      [[(BlockId, BlockId)]])
-&gt; (([NatCmmDecl statics instr], [Maybe RegAllocStats],
     [[(BlockId, BlockId)]]),
    UniqSupply)
forall a. UniqSupply -&gt; UniqSM a -&gt; (a, UniqSupply)
</span><a href="GHC.Types.Unique.Supply.html#initUs"><span class="hs-identifier hs-var">initUs</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681044181"><span class="hs-identifier hs-var">usLive</span></a></span><span>
</span><span id="line-681"></span><span>                          </span><span class="annot"><span class="annottext">(UniqSM
   ([NatCmmDecl statics instr], [Maybe RegAllocStats],
    [[(BlockId, BlockId)]])
 -&gt; (([NatCmmDecl statics instr], [Maybe RegAllocStats],
      [[(BlockId, BlockId)]]),
     UniqSupply))
-&gt; UniqSM
     ([NatCmmDecl statics instr], [Maybe RegAllocStats],
      [[(BlockId, BlockId)]])
-&gt; (([NatCmmDecl statics instr], [Maybe RegAllocStats],
     [[(BlockId, BlockId)]]),
    UniqSupply)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">([(NatCmmDecl statics instr, Maybe RegAllocStats,
   [(BlockId, BlockId)])]
 -&gt; ([NatCmmDecl statics instr], [Maybe RegAllocStats],
     [[(BlockId, BlockId)]]))
-&gt; UniqSM
     [(NatCmmDecl statics instr, Maybe RegAllocStats,
       [(BlockId, BlockId)])]
-&gt; UniqSM
     ([NatCmmDecl statics instr], [Maybe RegAllocStats],
      [[(BlockId, BlockId)]])
forall (m :: * -&gt; *) a1 r. Monad m =&gt; (a1 -&gt; r) -&gt; m a1 -&gt; m r
</span><a href="../../base/src/GHC.Base.html#liftM"><span class="hs-identifier hs-var">liftM</span></a></span><span> </span><span class="annot"><span class="annottext">[(NatCmmDecl statics instr, Maybe RegAllocStats,
  [(BlockId, BlockId)])]
-&gt; ([NatCmmDecl statics instr], [Maybe RegAllocStats],
    [[(BlockId, BlockId)]])
forall a b c. [(a, b, c)] -&gt; ([a], [b], [c])
</span><a href="../../base/src/GHC.List.html#unzip3"><span class="hs-identifier hs-var">unzip3</span></a></span><span>
</span><span id="line-682"></span><span>                          </span><span class="annot"><span class="annottext">(UniqSM
   [(NatCmmDecl statics instr, Maybe RegAllocStats,
     [(BlockId, BlockId)])]
 -&gt; UniqSM
      ([NatCmmDecl statics instr], [Maybe RegAllocStats],
       [[(BlockId, BlockId)]]))
-&gt; UniqSM
     [(NatCmmDecl statics instr, Maybe RegAllocStats,
       [(BlockId, BlockId)])]
-&gt; UniqSM
     ([NatCmmDecl statics instr], [Maybe RegAllocStats],
      [[(BlockId, BlockId)]])
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(LiveCmmDecl statics instr
 -&gt; UniqSM
      (NatCmmDecl statics instr, Maybe RegAllocStats,
       [(BlockId, BlockId)]))
-&gt; [LiveCmmDecl statics instr]
-&gt; UniqSM
     [(NatCmmDecl statics instr, Maybe RegAllocStats,
       [(BlockId, BlockId)])]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="annot"><span class="annottext">LiveCmmDecl statics instr
-&gt; UniqSM
     (NatCmmDecl statics instr, Maybe RegAllocStats,
      [(BlockId, BlockId)])
</span><a href="#local-6989586621681044138"><span class="hs-identifier hs-var">reg_alloc</span></a></span><span> </span><span class="annot"><span class="annottext">[LiveCmmDecl statics instr]
</span><a href="#local-6989586621681044182"><span class="hs-identifier hs-var">withLiveness</span></a></span><span>
</span><span id="line-683"></span><span>
</span><span id="line-684"></span><span>                </span><span class="annot"><span class="annottext">DynFlags -&gt; DumpFlag -&gt; String -&gt; DumpFormat -&gt; SDoc -&gt; IO ()
</span><a href="GHC.Utils.Error.html#dumpIfSet_dyn"><span class="hs-identifier hs-var">dumpIfSet_dyn</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044217"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-685"></span><span>                        </span><span class="annot"><span class="annottext">DumpFlag
</span><a href="GHC.Driver.Flags.html#Opt_D_dump_asm_regalloc"><span class="hs-identifier hs-var">Opt_D_dump_asm_regalloc</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Registers allocated&quot;</span></span><span>
</span><span id="line-686"></span><span>                        </span><span class="annot"><span class="annottext">DumpFormat
</span><a href="GHC.Utils.Error.html#FormatCMM"><span class="hs-identifier hs-var">FormatCMM</span></a></span><span>
</span><span id="line-687"></span><span>                        </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="annot"><span class="annottext">([SDoc] -&gt; SDoc) -&gt; [SDoc] -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(NatCmmDecl statics instr -&gt; SDoc)
-&gt; [NatCmmDecl statics instr] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest -&gt; NatCmmDecl statics instr -&gt; SDoc
forall statics instr jumpDest.
NcgImpl statics instr jumpDest -&gt; NatCmmDecl statics instr -&gt; SDoc
</span><a href="GHC.CmmToAsm.Monad.html#pprNatCmmDecl"><span class="hs-identifier hs-var hs-var">pprNatCmmDecl</span></a></span><span> </span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
</span><a href="#local-6989586621681044214"><span class="hs-identifier hs-var">ncgImpl</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[NatCmmDecl statics instr]
</span><a href="#local-6989586621681044129"><span class="hs-identifier hs-var">alloced</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-688"></span><span>
</span><span id="line-689"></span><span>                </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681044123"><span class="annot"><span class="annottext">mPprStats :: Maybe [RegAllocStats]
</span><a href="#local-6989586621681044123"><span class="hs-identifier hs-var hs-var">mPprStats</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-690"></span><span>                        </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">DumpFlag -&gt; DynFlags -&gt; Bool
</span><a href="GHC.Driver.Session.html#dopt"><span class="hs-identifier hs-var">dopt</span></a></span><span> </span><span class="annot"><span class="annottext">DumpFlag
</span><a href="GHC.Driver.Flags.html#Opt_D_dump_asm_stats"><span class="hs-identifier hs-var">Opt_D_dump_asm_stats</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044217"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-691"></span><span>                         </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">[RegAllocStats] -&gt; Maybe [RegAllocStats]
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Maybe RegAllocStats] -&gt; [RegAllocStats]
forall a. [Maybe a] -&gt; [a]
</span><a href="../../base/src/Data.Maybe.html#catMaybes"><span class="hs-identifier hs-var">catMaybes</span></a></span><span> </span><span class="annot"><span class="annottext">[Maybe RegAllocStats]
</span><a href="#local-6989586621681044128"><span class="hs-identifier hs-var">regAllocStats</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Maybe [RegAllocStats]
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-692"></span><span>
</span><span id="line-693"></span><span>                </span><span class="hs-comment">-- force evaluation of the Maybe to avoid space leak</span><span>
</span><span id="line-694"></span><span>                </span><span class="annot"><span class="annottext">Maybe [RegAllocStats]
</span><a href="#local-6989586621681044123"><span class="hs-identifier hs-var">mPprStats</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe [RegAllocStats] -&gt; IO () -&gt; IO ()
</span><span class="hs-operator hs-var">`seq`</span></span><span> </span><span class="annot"><span class="annottext">() -&gt; IO ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-695"></span><span>
</span><span id="line-696"></span><span>                </span><span class="annot"><span class="annottext">([NatCmmDecl statics instr], UniqSupply,
 Maybe [RegAllocStats statics instr], Maybe [RegAllocStats],
 [RegAllocStats], [(BlockId, BlockId)])
-&gt; IO
     ([NatCmmDecl statics instr], UniqSupply,
      Maybe [RegAllocStats statics instr], Maybe [RegAllocStats],
      [RegAllocStats], [(BlockId, BlockId)])
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span>  </span><span class="hs-special">(</span><span> </span><span class="annot"><span class="annottext">[NatCmmDecl statics instr]
</span><a href="#local-6989586621681044129"><span class="hs-identifier hs-var">alloced</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681044126"><span class="hs-identifier hs-var">usAlloc</span></a></span><span>
</span><span id="line-697"></span><span>                        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe [RegAllocStats statics instr]
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-698"></span><span>                        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe [RegAllocStats]
</span><a href="#local-6989586621681044123"><span class="hs-identifier hs-var">mPprStats</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Maybe RegAllocStats] -&gt; [RegAllocStats]
forall a. [Maybe a] -&gt; [a]
</span><a href="../../base/src/Data.Maybe.html#catMaybes"><span class="hs-identifier hs-var">catMaybes</span></a></span><span> </span><span class="annot"><span class="annottext">[Maybe RegAllocStats]
</span><a href="#local-6989586621681044128"><span class="hs-identifier hs-var">regAllocStats</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-699"></span><span>                        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[[(BlockId, BlockId)]] -&gt; [(BlockId, BlockId)]
forall (t :: * -&gt; *) a. Foldable t =&gt; t [a] -&gt; [a]
</span><a href="../../base/src/Data.Foldable.html#concat"><span class="hs-identifier hs-var">concat</span></a></span><span> </span><span class="annot"><span class="annottext">[[(BlockId, BlockId)]]
</span><a href="#local-6989586621681044127"><span class="hs-identifier hs-var">stack_updt_blks</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-700"></span><span>
</span><span id="line-701"></span><span>        </span><span class="hs-comment">-- Fixupblocks the register allocator inserted (from, regMoves, to)</span><span>
</span><span id="line-702"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span class="annot"><a href="#local-6989586621681044121"><span class="hs-identifier hs-type">cfgRegAllocUpdates</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.BlockId.html#BlockId"><span class="hs-identifier hs-type">BlockId</span></a></span><span class="hs-special">,</span><span class="annot"><a href="GHC.Cmm.BlockId.html#BlockId"><span class="hs-identifier hs-type">BlockId</span></a></span><span class="hs-special">,</span><span class="annot"><a href="GHC.Cmm.BlockId.html#BlockId"><span class="hs-identifier hs-type">BlockId</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-703"></span><span>            </span><span id="local-6989586621681044121"><span class="annot"><span class="annottext">cfgRegAllocUpdates :: [(BlockId, BlockId, BlockId)]
</span><a href="#local-6989586621681044121"><span class="hs-identifier hs-var hs-var">cfgRegAllocUpdates</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(RegAllocStats -&gt; [(BlockId, BlockId, BlockId)])
-&gt; [RegAllocStats] -&gt; [(BlockId, BlockId, BlockId)]
forall (t :: * -&gt; *) a b. Foldable t =&gt; (a -&gt; [b]) -&gt; t a -&gt; [b]
</span><a href="../../base/src/Data.Foldable.html#concatMap"><span class="hs-identifier hs-var">concatMap</span></a></span><span> </span><span class="annot"><span class="annottext">RegAllocStats -&gt; [(BlockId, BlockId, BlockId)]
</span><a href="GHC.CmmToAsm.Reg.Linear.Base.html#ra_fixupList"><span class="hs-identifier hs-var hs-var">Linear.ra_fixupList</span></a></span><span> </span><span class="annot"><span class="annottext">[RegAllocStats]
</span><a href="#local-6989586621681044173"><span class="hs-identifier hs-var">raStats</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-704"></span><span>
</span><span id="line-705"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681044118"><span class="annot"><span class="annottext">cfgWithFixupBlks :: Maybe CFG
</span><a href="#local-6989586621681044118"><span class="hs-identifier hs-var hs-var">cfgWithFixupBlks</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-706"></span><span>                </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621681044117"><span class="annot"><span class="annottext">CFG
</span><a href="#local-6989586621681044117"><span class="hs-identifier hs-var">cfg</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; CFG -&gt; [(BlockId, BlockId, BlockId)] -&gt; CFG
</span><a href="GHC.CmmToAsm.CFG.html#addNodesBetween"><span class="hs-identifier hs-var">addNodesBetween</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044217"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">CFG
</span><a href="#local-6989586621681044117"><span class="hs-identifier hs-var">cfg</span></a></span><span> </span><span class="annot"><span class="annottext">[(BlockId, BlockId, BlockId)]
</span><a href="#local-6989586621681044121"><span class="hs-identifier hs-var">cfgRegAllocUpdates</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(CFG -&gt; CFG) -&gt; Maybe CFG -&gt; Maybe CFG
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe CFG
</span><a href="#local-6989586621681044184"><span class="hs-identifier hs-var">livenessCfg</span></a></span><span>
</span><span id="line-707"></span><span>
</span><span id="line-708"></span><span>        </span><span class="hs-comment">-- Insert stack update blocks</span><span>
</span><span id="line-709"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681044115"><span class="annot"><span class="annottext">postRegCFG :: Maybe CFG
</span><a href="#local-6989586621681044115"><span class="hs-identifier hs-var hs-var">postRegCFG</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-710"></span><span>                </span><span class="annot"><span class="annottext">(CFG -&gt; [(BlockId, BlockId)] -&gt; CFG)
-&gt; Maybe (CFG -&gt; [(BlockId, BlockId)] -&gt; CFG)
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(CFG -&gt; (BlockId, BlockId) -&gt; CFG)
-&gt; CFG -&gt; [(BlockId, BlockId)] -&gt; CFG
forall (t :: * -&gt; *) b a.
Foldable t =&gt;
(b -&gt; a -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldl%27"><span class="hs-identifier hs-var">foldl'</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621681044114"><span class="annot"><span class="annottext">CFG
</span><a href="#local-6989586621681044114"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681044113"><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681044113"><span class="hs-identifier hs-var">from</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621681044112"><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681044112"><span class="hs-identifier hs-var">to</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; BlockId -&gt; BlockId -&gt; CFG -&gt; CFG
</span><a href="GHC.CmmToAsm.CFG.html#addImmediateSuccessor"><span class="hs-identifier hs-var">addImmediateSuccessor</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044217"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681044113"><span class="hs-identifier hs-var">from</span></a></span><span> </span><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681044112"><span class="hs-identifier hs-var">to</span></a></span><span> </span><span class="annot"><span class="annottext">CFG
</span><a href="#local-6989586621681044114"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-711"></span><span>                     </span><span class="annot"><span class="annottext">Maybe (CFG -&gt; [(BlockId, BlockId)] -&gt; CFG)
-&gt; Maybe CFG -&gt; Maybe ([(BlockId, BlockId)] -&gt; CFG)
forall (f :: * -&gt; *) a b. Applicative f =&gt; f (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#%3C%2A%3E"><span class="hs-operator hs-var">&lt;*&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe CFG
</span><a href="#local-6989586621681044118"><span class="hs-identifier hs-var">cfgWithFixupBlks</span></a></span><span>
</span><span id="line-712"></span><span>                     </span><span class="annot"><span class="annottext">Maybe ([(BlockId, BlockId)] -&gt; CFG)
-&gt; Maybe [(BlockId, BlockId)] -&gt; Maybe CFG
forall (f :: * -&gt; *) a b. Applicative f =&gt; f (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#%3C%2A%3E"><span class="hs-operator hs-var">&lt;*&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">[(BlockId, BlockId)] -&gt; Maybe [(BlockId, BlockId)]
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">[(BlockId, BlockId)]
</span><a href="#local-6989586621681044172"><span class="hs-identifier hs-var">stack_updt_blks</span></a></span><span>
</span><span id="line-713"></span><span>
</span><span id="line-714"></span><span>        </span><span class="hs-comment">---- generate jump tables</span><span>
</span><span id="line-715"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681044110"><span class="annot"><span class="annottext">tabled :: [NatCmmDecl statics instr]
</span><a href="#local-6989586621681044110"><span class="hs-identifier hs-var hs-var">tabled</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span>
</span><span id="line-716"></span><span>                </span><span class="hs-pragma">{-# SCC</span><span> </span><span class="hs-pragma">&quot;generateJumpTables&quot;</span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-717"></span><span>                </span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
-&gt; [NatCmmDecl statics instr] -&gt; [NatCmmDecl statics instr]
forall statics instr jumpDest.
NcgImpl statics instr jumpDest
-&gt; [NatCmmDecl statics instr] -&gt; [NatCmmDecl statics instr]
</span><a href="GHC.CmmToAsm.html#generateJumpTables"><span class="hs-identifier hs-var">generateJumpTables</span></a></span><span> </span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
</span><a href="#local-6989586621681044214"><span class="hs-identifier hs-var">ncgImpl</span></a></span><span> </span><span class="annot"><span class="annottext">[NatCmmDecl statics instr]
</span><a href="#local-6989586621681044177"><span class="hs-identifier hs-var">alloced</span></a></span><span>
</span><span id="line-718"></span><span>
</span><span id="line-719"></span><span>        </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">(Bool -&gt; Bool) -&gt; Bool -&gt; Bool
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CFG -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">CFG
</span><a href="#local-6989586621681044190"><span class="hs-identifier hs-var">nativeCfgWeights</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; DumpFlag -&gt; String -&gt; DumpFormat -&gt; SDoc -&gt; IO ()
</span><a href="GHC.Utils.Error.html#dumpIfSet_dyn"><span class="hs-identifier hs-var">dumpIfSet_dyn</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044217"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-720"></span><span>                </span><span class="annot"><span class="annottext">DumpFlag
</span><a href="GHC.Driver.Flags.html#Opt_D_dump_cfg_weights"><span class="hs-identifier hs-var">Opt_D_dump_cfg_weights</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;CFG Update information&quot;</span></span><span>
</span><span id="line-721"></span><span>                </span><span class="annot"><span class="annottext">DumpFormat
</span><a href="GHC.Utils.Error.html#FormatText"><span class="hs-identifier hs-var">FormatText</span></a></span><span>
</span><span id="line-722"></span><span>                </span><span class="hs-special">(</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;stack:&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">[(BlockId, BlockId)] -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">[(BlockId, BlockId)]
</span><a href="#local-6989586621681044172"><span class="hs-identifier hs-var">stack_updt_blks</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span>
</span><span id="line-723"></span><span>                  </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;linearAlloc:&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">[(BlockId, BlockId, BlockId)] -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">[(BlockId, BlockId, BlockId)]
</span><a href="#local-6989586621681044121"><span class="hs-identifier hs-var">cfgRegAllocUpdates</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-724"></span><span>
</span><span id="line-725"></span><span>        </span><span class="hs-comment">---- shortcut branches</span><span>
</span><span id="line-726"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681044106"><span class="annot"><span class="annottext">[NatCmmDecl statics instr]
</span><a href="#local-6989586621681044106"><span class="hs-identifier hs-var">shorted</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681044105"><span class="annot"><span class="annottext">Maybe CFG
</span><a href="#local-6989586621681044105"><span class="hs-identifier hs-var">postShortCFG</span></a></span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span>
</span><span id="line-727"></span><span>                </span><span class="hs-pragma">{-# SCC</span><span> </span><span class="hs-pragma">&quot;shortcutBranches&quot;</span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-728"></span><span>                </span><span class="annot"><span class="annottext">DynFlags
-&gt; NcgImpl statics instr jumpDest
-&gt; [NatCmmDecl statics instr]
-&gt; Maybe CFG
-&gt; ([NatCmmDecl statics instr], Maybe CFG)
forall statics instr jumpDest.
Outputable jumpDest =&gt;
DynFlags
-&gt; NcgImpl statics instr jumpDest
-&gt; [NatCmmDecl statics instr]
-&gt; Maybe CFG
-&gt; ([NatCmmDecl statics instr], Maybe CFG)
</span><a href="GHC.CmmToAsm.html#shortcutBranches"><span class="hs-identifier hs-var">shortcutBranches</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044217"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
</span><a href="#local-6989586621681044214"><span class="hs-identifier hs-var">ncgImpl</span></a></span><span> </span><span class="annot"><span class="annottext">[NatCmmDecl statics instr]
</span><a href="#local-6989586621681044110"><span class="hs-identifier hs-var">tabled</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe CFG
</span><a href="#local-6989586621681044115"><span class="hs-identifier hs-var">postRegCFG</span></a></span><span>
</span><span id="line-729"></span><span>
</span><span id="line-730"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span class="annot"><a href="#local-6989586621681044103"><span class="hs-identifier hs-type">optimizedCFG</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.CFG.html#CFG"><span class="hs-identifier hs-type">CFG</span></a></span><span>
</span><span id="line-731"></span><span>            </span><span id="local-6989586621681044103"><span class="annot"><span class="annottext">optimizedCFG :: Maybe CFG
</span><a href="#local-6989586621681044103"><span class="hs-identifier hs-var hs-var">optimizedCFG</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-732"></span><span>                </span><span class="annot"><span class="annottext">Bool -&gt; CfgWeights -&gt; RawCmmDecl -&gt; CFG -&gt; CFG
</span><a href="GHC.CmmToAsm.CFG.html#optimizeCFG"><span class="hs-identifier hs-var">optimizeCFG</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GeneralFlag -&gt; DynFlags -&gt; Bool
</span><a href="GHC.Driver.Session.html#gopt"><span class="hs-identifier hs-var">gopt</span></a></span><span> </span><span class="annot"><span class="annottext">GeneralFlag
</span><a href="GHC.Driver.Flags.html#Opt_CmmStaticPred"><span class="hs-identifier hs-var">Opt_CmmStaticPred</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044217"><span class="hs-identifier hs-var">dflags</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; CfgWeights
</span><a href="GHC.Driver.Session.html#cfgWeightInfo"><span class="hs-identifier hs-var hs-var">cfgWeightInfo</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044217"><span class="hs-identifier hs-var">dflags</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">RawCmmDecl
</span><a href="#local-6989586621681044210"><span class="hs-identifier hs-var">cmm</span></a></span><span> </span><span class="annot"><span class="annottext">(CFG -&gt; CFG) -&gt; Maybe CFG -&gt; Maybe CFG
forall (m :: * -&gt; *) a1 r. Monad m =&gt; (a1 -&gt; r) -&gt; m a1 -&gt; m r
</span><a href="../../base/src/Control.Monad.html#%3C%24%21%3E"><span class="hs-operator hs-var">&lt;$!&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe CFG
</span><a href="#local-6989586621681044105"><span class="hs-identifier hs-var">postShortCFG</span></a></span><span>
</span><span id="line-733"></span><span>
</span><span id="line-734"></span><span>        </span><span class="annot"><span class="annottext">DynFlags -&gt; Maybe CFG -&gt; String -&gt; SDoc -&gt; IO ()
</span><a href="GHC.CmmToAsm.html#maybeDumpCfg"><span class="hs-identifier hs-var">maybeDumpCfg</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044217"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe CFG
</span><a href="#local-6989586621681044103"><span class="hs-identifier hs-var">optimizedCFG</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;CFG Weights - Final&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681044206"><span class="hs-identifier hs-var">proc_name</span></a></span><span>
</span><span id="line-735"></span><span>
</span><span id="line-736"></span><span>        </span><span class="hs-comment">--TODO: Partially check validity of the cfg.</span><span>
</span><span id="line-737"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681044099"><span class="annot"><span class="annottext">getBlks :: GenCmmDecl d h (ListGraph i) -&gt; [GenBasicBlock i]
</span><a href="#local-6989586621681044099"><span class="hs-identifier hs-var hs-var">getBlks</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#CmmProc"><span class="hs-identifier hs-type">CmmProc</span></a></span><span> </span><span id="local-6989586621681044098"><span class="annot"><span class="annottext">h
</span><a href="#local-6989586621681044098"><span class="hs-identifier hs-var">_info</span></a></span></span><span> </span><span id="local-6989586621681044097"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681044097"><span class="hs-identifier hs-var">_lbl</span></a></span></span><span> </span><span id="local-6989586621681044096"><span class="annot"><span class="annottext">[GlobalReg]
</span><a href="#local-6989586621681044096"><span class="hs-identifier hs-var">_live</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#ListGraph"><span class="hs-identifier hs-type">ListGraph</span></a></span><span> </span><span id="local-6989586621681044094"><span class="annot"><span class="annottext">[GenBasicBlock i]
</span><a href="#local-6989586621681044094"><span class="hs-identifier hs-var">blocks</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[GenBasicBlock i]
</span><a href="#local-6989586621681044094"><span class="hs-identifier hs-var">blocks</span></a></span><span>
</span><span id="line-738"></span><span>            </span><span class="annot"><a href="#local-6989586621681044099"><span class="hs-identifier hs-var">getBlks</span></a></span><span> </span><span class="annot"><span class="annottext">GenCmmDecl d h (ListGraph i)
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-739"></span><span>
</span><span id="line-740"></span><span>        </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Bool
</span><a href="GHC.CmmToAsm.BlockLayout.html#backendMaintainsCfg"><span class="hs-identifier hs-var">backendMaintainsCfg</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681044207"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span>
</span><span id="line-741"></span><span>                </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GeneralFlag -&gt; DynFlags -&gt; Bool
</span><a href="GHC.Driver.Session.html#gopt"><span class="hs-identifier hs-var">gopt</span></a></span><span> </span><span class="annot"><span class="annottext">GeneralFlag
</span><a href="GHC.Driver.Flags.html#Opt_DoAsmLinting"><span class="hs-identifier hs-var">Opt_DoAsmLinting</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044217"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Utils.Misc.html#debugIsOn"><span class="hs-identifier hs-var">debugIsOn</span></a></span><span> </span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-742"></span><span>                </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681044090"><span class="annot"><span class="annottext">blocks :: [GenBasicBlock instr]
</span><a href="#local-6989586621681044090"><span class="hs-identifier hs-var hs-var">blocks</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(NatCmmDecl statics instr -&gt; [GenBasicBlock instr])
-&gt; [NatCmmDecl statics instr] -&gt; [GenBasicBlock instr]
forall (t :: * -&gt; *) a b. Foldable t =&gt; (a -&gt; [b]) -&gt; t a -&gt; [b]
</span><a href="../../base/src/Data.Foldable.html#concatMap"><span class="hs-identifier hs-var">concatMap</span></a></span><span> </span><span class="annot"><span class="annottext">NatCmmDecl statics instr -&gt; [GenBasicBlock instr]
forall {d} {h} {i}.
GenCmmDecl d h (ListGraph i) -&gt; [GenBasicBlock i]
</span><a href="#local-6989586621681044099"><span class="hs-identifier hs-var">getBlks</span></a></span><span> </span><span class="annot"><span class="annottext">[NatCmmDecl statics instr]
</span><a href="#local-6989586621681044106"><span class="hs-identifier hs-var">shorted</span></a></span><span>
</span><span id="line-743"></span><span>                </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681044089"><span class="annot"><span class="annottext">labels :: LabelSet
</span><a href="#local-6989586621681044089"><span class="hs-identifier hs-var hs-var">labels</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[ElemOf LabelSet] -&gt; LabelSet
forall set. IsSet set =&gt; [ElemOf set] -&gt; set
</span><a href="GHC.Cmm.Dataflow.Collections.html#setFromList"><span class="hs-identifier hs-var">setFromList</span></a></span><span> </span><span class="annot"><span class="annottext">([ElemOf LabelSet] -&gt; LabelSet) -&gt; [ElemOf LabelSet] -&gt; LabelSet
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(GenBasicBlock instr -&gt; BlockId)
-&gt; [GenBasicBlock instr] -&gt; [BlockId]
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">GenBasicBlock instr -&gt; BlockId
forall i. GenBasicBlock i -&gt; BlockId
</span><a href="GHC.Cmm.html#blockId"><span class="hs-identifier hs-var">blockId</span></a></span><span> </span><span class="annot"><span class="annottext">[GenBasicBlock instr]
</span><a href="#local-6989586621681044090"><span class="hs-identifier hs-var">blocks</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#LabelSet"><span class="hs-identifier hs-type">LabelSet</span></a></span><span>
</span><span id="line-744"></span><span>                </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681044084"><span class="annot"><span class="annottext">cfg :: CFG
</span><a href="#local-6989586621681044084"><span class="hs-identifier hs-var hs-var">cfg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe CFG -&gt; CFG
forall a. HasCallStack =&gt; Maybe a -&gt; a
</span><a href="../../base/src/Data.Maybe.html#fromJust"><span class="hs-identifier hs-var">fromJust</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe CFG
</span><a href="#local-6989586621681044103"><span class="hs-identifier hs-var">optimizedCFG</span></a></span><span>
</span><span id="line-745"></span><span>                </span><span class="annot"><span class="annottext">() -&gt; IO ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(() -&gt; IO ()) -&gt; () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24%21"><span class="hs-operator hs-var">$!</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; () -&gt; ()
</span><span class="hs-identifier hs-var">seq</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CFG -&gt; LabelSet -&gt; SDoc -&gt; Bool
</span><a href="GHC.CmmToAsm.CFG.html#sanityCheckCfg"><span class="hs-identifier hs-var">sanityCheckCfg</span></a></span><span> </span><span class="annot"><span class="annottext">CFG
</span><a href="#local-6989586621681044084"><span class="hs-identifier hs-var">cfg</span></a></span><span> </span><span class="annot"><span class="annottext">LabelSet
</span><a href="#local-6989586621681044089"><span class="hs-identifier hs-var">labels</span></a></span><span> </span><span class="annot"><span class="annottext">(SDoc -&gt; Bool) -&gt; SDoc -&gt; Bool
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-746"></span><span>                                </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;cfg not in lockstep&quot;</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-747"></span><span>
</span><span id="line-748"></span><span>        </span><span class="hs-comment">---- sequence blocks</span><span>
</span><span id="line-749"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span class="annot"><a href="#local-6989586621681044080"><span class="hs-identifier hs-type">sequenced</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#NatCmmDecl"><span class="hs-identifier hs-type">NatCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045058"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045059"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-750"></span><span>            </span><span id="local-6989586621681044080"><span class="annot"><span class="annottext">sequenced :: [NatCmmDecl statics instr]
</span><a href="#local-6989586621681044080"><span class="hs-identifier hs-var hs-var">sequenced</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-751"></span><span>                </span><span class="annot"><span class="annottext">[NatCmmDecl statics instr]
-&gt; [NatCmmDecl statics instr] -&gt; [NatCmmDecl statics instr]
forall statics instr.
[NatCmmDecl statics instr]
-&gt; [NatCmmDecl statics instr] -&gt; [NatCmmDecl statics instr]
</span><a href="GHC.CmmToAsm.html#checkLayout"><span class="hs-identifier hs-var">checkLayout</span></a></span><span> </span><span class="annot"><span class="annottext">[NatCmmDecl statics instr]
</span><a href="#local-6989586621681044106"><span class="hs-identifier hs-var">shorted</span></a></span><span> </span><span class="annot"><span class="annottext">([NatCmmDecl statics instr] -&gt; [NatCmmDecl statics instr])
-&gt; [NatCmmDecl statics instr] -&gt; [NatCmmDecl statics instr]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-752"></span><span>                </span><span class="hs-pragma">{-# SCC</span><span> </span><span class="hs-pragma">&quot;sequenceBlocks&quot;</span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-753"></span><span>                </span><span class="annot"><span class="annottext">(NatCmmDecl statics instr -&gt; NatCmmDecl statics instr)
-&gt; [NatCmmDecl statics instr] -&gt; [NatCmmDecl statics instr]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags
-&gt; NcgImpl statics instr jumpDest
-&gt; Maybe CFG
-&gt; NatCmmDecl statics instr
-&gt; NatCmmDecl statics instr
forall instr statics jumpDest.
(Instruction instr, Outputable instr) =&gt;
DynFlags
-&gt; NcgImpl statics instr jumpDest
-&gt; Maybe CFG
-&gt; NatCmmDecl statics instr
-&gt; NatCmmDecl statics instr
</span><a href="GHC.CmmToAsm.BlockLayout.html#sequenceTop"><span class="hs-identifier hs-var">BlockLayout.sequenceTop</span></a></span><span>
</span><span id="line-754"></span><span>                        </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044217"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-755"></span><span>                        </span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
</span><a href="#local-6989586621681044214"><span class="hs-identifier hs-var">ncgImpl</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe CFG
</span><a href="#local-6989586621681044103"><span class="hs-identifier hs-var">optimizedCFG</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-756"></span><span>                    </span><span class="annot"><span class="annottext">[NatCmmDecl statics instr]
</span><a href="#local-6989586621681044106"><span class="hs-identifier hs-var">shorted</span></a></span><span>
</span><span id="line-757"></span><span>
</span><span id="line-758"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span class="annot"><a href="#local-6989586621681044077"><span class="hs-identifier hs-type">branchOpt</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#NatCmmDecl"><span class="hs-identifier hs-type">NatCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045058"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045059"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-759"></span><span>            </span><span id="local-6989586621681044077"><span class="annot"><span class="annottext">branchOpt :: [NatCmmDecl statics instr]
</span><a href="#local-6989586621681044077"><span class="hs-identifier hs-var hs-var">branchOpt</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-760"></span><span>                </span><span class="hs-pragma">{-# SCC</span><span> </span><span class="hs-pragma">&quot;invertCondBranches&quot;</span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-761"></span><span>                </span><span class="annot"><span class="annottext">(NatCmmDecl statics instr -&gt; NatCmmDecl statics instr)
-&gt; [NatCmmDecl statics instr] -&gt; [NatCmmDecl statics instr]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">NatCmmDecl statics instr -&gt; NatCmmDecl statics instr
</span><a href="#local-6989586621681044076"><span class="hs-identifier hs-var">invert</span></a></span><span> </span><span class="annot"><span class="annottext">[NatCmmDecl statics instr]
</span><a href="#local-6989586621681044080"><span class="hs-identifier hs-var">sequenced</span></a></span><span>
</span><span id="line-762"></span><span>              </span><span class="hs-keyword">where</span><span>
</span><span id="line-763"></span><span>                </span><span class="annot"><a href="#local-6989586621681044075"><span class="hs-identifier hs-type">invertConds</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#LabelMap"><span class="hs-identifier hs-type">LabelMap</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.html#RawCmmStatics"><span class="hs-identifier hs-type">RawCmmStatics</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#NatBasicBlock"><span class="hs-identifier hs-type">NatBasicBlock</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045059"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-764"></span><span>                            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#NatBasicBlock"><span class="hs-identifier hs-type">NatBasicBlock</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681045059"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-765"></span><span>                </span><span id="local-6989586621681044075"><span class="annot"><span class="annottext">invertConds :: LabelMap RawCmmStatics
-&gt; [GenBasicBlock instr] -&gt; [GenBasicBlock instr]
</span><a href="#local-6989586621681044075"><span class="hs-identifier hs-var hs-var">invertConds</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
-&gt; Maybe CFG
-&gt; LabelMap RawCmmStatics
-&gt; [GenBasicBlock instr]
-&gt; [GenBasicBlock instr]
forall statics instr jumpDest.
NcgImpl statics instr jumpDest
-&gt; Maybe CFG
-&gt; LabelMap RawCmmStatics
-&gt; [NatBasicBlock instr]
-&gt; [NatBasicBlock instr]
</span><a href="GHC.CmmToAsm.Monad.html#invertCondBranches"><span class="hs-identifier hs-var hs-var">invertCondBranches</span></a></span><span> </span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
</span><a href="#local-6989586621681044214"><span class="hs-identifier hs-var">ncgImpl</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe CFG
</span><a href="#local-6989586621681044103"><span class="hs-identifier hs-var">optimizedCFG</span></a></span><span>
</span><span id="line-766"></span><span>                </span><span id="local-6989586621681044076"><span class="annot"><span class="annottext">invert :: NatCmmDecl statics instr -&gt; NatCmmDecl statics instr
</span><a href="#local-6989586621681044076"><span class="hs-identifier hs-var hs-var">invert</span></a></span></span><span> </span><span id="local-6989586621681044074"><span class="annot"><span class="annottext">top :: NatCmmDecl statics instr
</span><a href="#local-6989586621681044074"><span class="hs-identifier hs-var">top</span></a></span></span><span class="hs-glyph">@</span><span class="annot"><a href="GHC.Cmm.html#CmmData"><span class="hs-identifier hs-type">CmmData</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NatCmmDecl statics instr
</span><a href="#local-6989586621681044074"><span class="hs-identifier hs-var">top</span></a></span><span>
</span><span id="line-767"></span><span>                </span><span class="annot"><a href="#local-6989586621681044076"><span class="hs-identifier hs-var">invert</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#CmmProc"><span class="hs-identifier hs-type">CmmProc</span></a></span><span> </span><span id="local-6989586621681044072"><span class="annot"><span class="annottext">LabelMap RawCmmStatics
</span><a href="#local-6989586621681044072"><span class="hs-identifier hs-var">info</span></a></span></span><span> </span><span id="local-6989586621681044071"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681044071"><span class="hs-identifier hs-var">lbl</span></a></span></span><span> </span><span id="local-6989586621681044070"><span class="annot"><span class="annottext">[GlobalReg]
</span><a href="#local-6989586621681044070"><span class="hs-identifier hs-var">live</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#ListGraph"><span class="hs-identifier hs-type">ListGraph</span></a></span><span> </span><span id="local-6989586621681044069"><span class="annot"><span class="annottext">[GenBasicBlock instr]
</span><a href="#local-6989586621681044069"><span class="hs-identifier hs-var">blocks</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-768"></span><span>                    </span><span class="annot"><span class="annottext">LabelMap RawCmmStatics
-&gt; CLabel
-&gt; [GlobalReg]
-&gt; ListGraph instr
-&gt; NatCmmDecl statics instr
forall d h g. h -&gt; CLabel -&gt; [GlobalReg] -&gt; g -&gt; GenCmmDecl d h g
</span><a href="GHC.Cmm.html#CmmProc"><span class="hs-identifier hs-var">CmmProc</span></a></span><span> </span><span class="annot"><span class="annottext">LabelMap RawCmmStatics
</span><a href="#local-6989586621681044072"><span class="hs-identifier hs-var">info</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681044071"><span class="hs-identifier hs-var">lbl</span></a></span><span> </span><span class="annot"><span class="annottext">[GlobalReg]
</span><a href="#local-6989586621681044070"><span class="hs-identifier hs-var">live</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[GenBasicBlock instr] -&gt; ListGraph instr
forall i. [GenBasicBlock i] -&gt; ListGraph i
</span><a href="GHC.Cmm.html#ListGraph"><span class="hs-identifier hs-var">ListGraph</span></a></span><span> </span><span class="annot"><span class="annottext">([GenBasicBlock instr] -&gt; ListGraph instr)
-&gt; [GenBasicBlock instr] -&gt; ListGraph instr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">LabelMap RawCmmStatics
-&gt; [GenBasicBlock instr] -&gt; [GenBasicBlock instr]
</span><a href="#local-6989586621681044075"><span class="hs-identifier hs-var">invertConds</span></a></span><span> </span><span class="annot"><span class="annottext">LabelMap RawCmmStatics
</span><a href="#local-6989586621681044072"><span class="hs-identifier hs-var">info</span></a></span><span> </span><span class="annot"><span class="annottext">[GenBasicBlock instr]
</span><a href="#local-6989586621681044069"><span class="hs-identifier hs-var">blocks</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-769"></span><span>
</span><span id="line-770"></span><span>        </span><span class="hs-comment">---- expansion of SPARC synthetic instrs</span><span>
</span><span id="line-771"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681044068"><span class="annot"><span class="annottext">expanded :: [NatCmmDecl statics instr]
</span><a href="#local-6989586621681044068"><span class="hs-identifier hs-var hs-var">expanded</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-772"></span><span>                </span><span class="hs-pragma">{-# SCC</span><span> </span><span class="hs-pragma">&quot;sparc_expand&quot;</span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-773"></span><span>                </span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
-&gt; [NatCmmDecl statics instr] -&gt; [NatCmmDecl statics instr]
forall statics instr jumpDest.
NcgImpl statics instr jumpDest
-&gt; [NatCmmDecl statics instr] -&gt; [NatCmmDecl statics instr]
</span><a href="GHC.CmmToAsm.Monad.html#ncgExpandTop"><span class="hs-identifier hs-var hs-var">ncgExpandTop</span></a></span><span> </span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
</span><a href="#local-6989586621681044214"><span class="hs-identifier hs-var">ncgImpl</span></a></span><span> </span><span class="annot"><span class="annottext">[NatCmmDecl statics instr]
</span><a href="#local-6989586621681044077"><span class="hs-identifier hs-var">branchOpt</span></a></span><span>
</span><span id="line-774"></span><span>                </span><span class="hs-comment">--ncgExpandTop ncgImpl sequenced</span><span>
</span><span id="line-775"></span><span>
</span><span id="line-776"></span><span>        </span><span class="annot"><span class="annottext">DynFlags -&gt; DumpFlag -&gt; String -&gt; DumpFormat -&gt; SDoc -&gt; IO ()
</span><a href="GHC.Utils.Error.html#dumpIfSet_dyn"><span class="hs-identifier hs-var">dumpIfSet_dyn</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044217"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-777"></span><span>                </span><span class="annot"><span class="annottext">DumpFlag
</span><a href="GHC.Driver.Flags.html#Opt_D_dump_asm_expanded"><span class="hs-identifier hs-var">Opt_D_dump_asm_expanded</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Synthetic instructions expanded&quot;</span></span><span>
</span><span id="line-778"></span><span>                </span><span class="annot"><span class="annottext">DumpFormat
</span><a href="GHC.Utils.Error.html#FormatCMM"><span class="hs-identifier hs-var">FormatCMM</span></a></span><span>
</span><span id="line-779"></span><span>                </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="annot"><span class="annottext">([SDoc] -&gt; SDoc) -&gt; [SDoc] -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(NatCmmDecl statics instr -&gt; SDoc)
-&gt; [NatCmmDecl statics instr] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest -&gt; NatCmmDecl statics instr -&gt; SDoc
forall statics instr jumpDest.
NcgImpl statics instr jumpDest -&gt; NatCmmDecl statics instr -&gt; SDoc
</span><a href="GHC.CmmToAsm.Monad.html#pprNatCmmDecl"><span class="hs-identifier hs-var hs-var">pprNatCmmDecl</span></a></span><span> </span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
</span><a href="#local-6989586621681044214"><span class="hs-identifier hs-var">ncgImpl</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[NatCmmDecl statics instr]
</span><a href="#local-6989586621681044068"><span class="hs-identifier hs-var">expanded</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-780"></span><span>
</span><span id="line-781"></span><span>        </span><span class="hs-comment">-- generate unwinding information from cmm</span><span>
</span><span id="line-782"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span class="annot"><a href="#local-6989586621681044066"><span class="hs-identifier hs-type">unwinds</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#BlockMap"><span class="hs-identifier hs-type">BlockMap</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UnwindPoint"><span class="hs-identifier hs-type">UnwindPoint</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-783"></span><span>            </span><span id="local-6989586621681044066"><span class="annot"><span class="annottext">unwinds :: LabelMap [UnwindPoint]
</span><a href="#local-6989586621681044066"><span class="hs-identifier hs-var hs-var">unwinds</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-784"></span><span>                </span><span class="hs-pragma">{-# SCC</span><span> </span><span class="hs-pragma">&quot;unwindingInfo&quot;</span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-785"></span><span>                </span><span class="annot"><span class="annottext">(LabelMap [UnwindPoint]
 -&gt; NatCmmDecl statics instr -&gt; LabelMap [UnwindPoint])
-&gt; LabelMap [UnwindPoint]
-&gt; [NatCmmDecl statics instr]
-&gt; LabelMap [UnwindPoint]
forall (t :: * -&gt; *) b a.
Foldable t =&gt;
(b -&gt; a -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldl%27"><span class="hs-identifier hs-var">foldl'</span></a></span><span> </span><span class="annot"><span class="annottext">LabelMap [UnwindPoint]
-&gt; NatCmmDecl statics instr -&gt; LabelMap [UnwindPoint]
</span><a href="#local-6989586621681044064"><span class="hs-identifier hs-var">addUnwind</span></a></span><span> </span><span class="annot"><span class="annottext">LabelMap [UnwindPoint]
forall (map :: * -&gt; *) a. IsMap map =&gt; map a
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapEmpty"><span class="hs-identifier hs-var">mapEmpty</span></a></span><span> </span><span class="annot"><span class="annottext">[NatCmmDecl statics instr]
</span><a href="#local-6989586621681044068"><span class="hs-identifier hs-var">expanded</span></a></span><span>
</span><span id="line-786"></span><span>              </span><span class="hs-keyword">where</span><span>
</span><span id="line-787"></span><span>                </span><span id="local-6989586621681044064"><span class="annot"><span class="annottext">addUnwind :: LabelMap [UnwindPoint]
-&gt; NatCmmDecl statics instr -&gt; LabelMap [UnwindPoint]
</span><a href="#local-6989586621681044064"><span class="hs-identifier hs-var hs-var">addUnwind</span></a></span></span><span> </span><span id="local-6989586621681044063"><span class="annot"><span class="annottext">LabelMap [UnwindPoint]
</span><a href="#local-6989586621681044063"><span class="hs-identifier hs-var">acc</span></a></span></span><span> </span><span id="local-6989586621681044062"><span class="annot"><span class="annottext">NatCmmDecl statics instr
</span><a href="#local-6989586621681044062"><span class="hs-identifier hs-var">proc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-788"></span><span>                    </span><span class="annot"><span class="annottext">LabelMap [UnwindPoint]
</span><a href="#local-6989586621681044063"><span class="hs-identifier hs-var">acc</span></a></span><span> </span><span class="annot"><span class="annottext">LabelMap [UnwindPoint]
-&gt; LabelMap [UnwindPoint] -&gt; LabelMap [UnwindPoint]
forall (map :: * -&gt; *) a. IsMap map =&gt; map a -&gt; map a -&gt; map a
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapUnion"><span class="hs-operator hs-var">`mapUnion`</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
-&gt; NcgImpl statics instr jumpDest
-&gt; NatCmmDecl statics instr
-&gt; LabelMap [UnwindPoint]
forall instr statics jumpDest.
Instruction instr =&gt;
DynFlags
-&gt; NcgImpl statics instr jumpDest
-&gt; NatCmmDecl statics instr
-&gt; LabelMap [UnwindPoint]
</span><a href="GHC.CmmToAsm.html#computeUnwinding"><span class="hs-identifier hs-var">computeUnwinding</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044217"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
</span><a href="#local-6989586621681044214"><span class="hs-identifier hs-var">ncgImpl</span></a></span><span> </span><span class="annot"><span class="annottext">NatCmmDecl statics instr
</span><a href="#local-6989586621681044062"><span class="hs-identifier hs-var">proc</span></a></span><span>
</span><span id="line-789"></span><span>
</span><span id="line-790"></span><span>        </span><span class="annot"><span class="annottext">(UniqSupply, DwarfFiles, [NatCmmDecl statics instr], [CLabel],
 Maybe [RegAllocStats statics instr], Maybe [RegAllocStats],
 LabelMap [UnwindPoint])
-&gt; IO
     (UniqSupply, DwarfFiles, [NatCmmDecl statics instr], [CLabel],
      Maybe [RegAllocStats statics instr], Maybe [RegAllocStats],
      LabelMap [UnwindPoint])
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span>  </span><span class="hs-special">(</span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681044176"><span class="hs-identifier hs-var">usAlloc</span></a></span><span>
</span><span id="line-791"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">DwarfFiles
</span><a href="#local-6989586621681044191"><span class="hs-identifier hs-var">fileIds'</span></a></span><span>
</span><span id="line-792"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[NatCmmDecl statics instr]
</span><a href="#local-6989586621681044068"><span class="hs-identifier hs-var">expanded</span></a></span><span>
</span><span id="line-793"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[CLabel]
</span><a href="#local-6989586621681044192"><span class="hs-identifier hs-var">lastMinuteImports</span></a></span><span> </span><span class="annot"><span class="annottext">[CLabel] -&gt; [CLabel] -&gt; [CLabel]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[CLabel]
</span><a href="#local-6989586621681044201"><span class="hs-identifier hs-var">imports</span></a></span><span>
</span><span id="line-794"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe [RegAllocStats statics instr]
</span><a href="#local-6989586621681044175"><span class="hs-identifier hs-var">ppr_raStatsColor</span></a></span><span>
</span><span id="line-795"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe [RegAllocStats]
</span><a href="#local-6989586621681044174"><span class="hs-identifier hs-var">ppr_raStatsLinear</span></a></span><span>
</span><span id="line-796"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">LabelMap [UnwindPoint]
</span><a href="#local-6989586621681044066"><span class="hs-identifier hs-var">unwinds</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-797"></span><span>
</span><span id="line-798"></span><span class="annot"><a href="GHC.CmmToAsm.html#maybeDumpCfg"><span class="hs-identifier hs-type">maybeDumpCfg</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.CFG.html#CFG"><span class="hs-identifier hs-type">CFG</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-799"></span><span id="maybeDumpCfg"><span class="annot"><span class="annottext">maybeDumpCfg :: DynFlags -&gt; Maybe CFG -&gt; String -&gt; SDoc -&gt; IO ()
</span><a href="GHC.CmmToAsm.html#maybeDumpCfg"><span class="hs-identifier hs-var hs-var">maybeDumpCfg</span></a></span></span><span> </span><span id="local-6989586621681044060"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044060"><span class="hs-identifier hs-var">_dflags</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe CFG
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">() -&gt; IO ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-800"></span><span class="annot"><a href="GHC.CmmToAsm.html#maybeDumpCfg"><span class="hs-identifier hs-var">maybeDumpCfg</span></a></span><span> </span><span id="local-6989586621681044059"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044059"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681044058"><span class="annot"><span class="annottext">CFG
</span><a href="#local-6989586621681044058"><span class="hs-identifier hs-var">cfg</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681044057"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681044057"><span class="hs-identifier hs-var">msg</span></a></span></span><span> </span><span id="local-6989586621681044056"><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681044056"><span class="hs-identifier hs-var">proc_name</span></a></span></span><span>
</span><span id="line-801"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">CFG -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">CFG
</span><a href="#local-6989586621681044058"><span class="hs-identifier hs-var">cfg</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">() -&gt; IO ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-802"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-803"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; DumpFlag -&gt; String -&gt; DumpFormat -&gt; SDoc -&gt; IO ()
</span><a href="GHC.Utils.Error.html#dumpIfSet_dyn"><span class="hs-identifier hs-var">dumpIfSet_dyn</span></a></span><span>
</span><span id="line-804"></span><span>                </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044059"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">DumpFlag
</span><a href="GHC.Driver.Flags.html#Opt_D_dump_cfg_weights"><span class="hs-identifier hs-var">Opt_D_dump_cfg_weights</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681044057"><span class="hs-identifier hs-var">msg</span></a></span><span>
</span><span id="line-805"></span><span>                </span><span class="annot"><span class="annottext">DumpFormat
</span><a href="GHC.Utils.Error.html#FormatText"><span class="hs-identifier hs-var">FormatText</span></a></span><span>
</span><span id="line-806"></span><span>                </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681044056"><span class="hs-identifier hs-var">proc_name</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">':'</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">CFG -&gt; SDoc
</span><a href="GHC.CmmToAsm.CFG.html#pprEdgeWeights"><span class="hs-identifier hs-var">pprEdgeWeights</span></a></span><span> </span><span class="annot"><span class="annottext">CFG
</span><a href="#local-6989586621681044058"><span class="hs-identifier hs-var">cfg</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-807"></span><span>
</span><span id="line-808"></span><span class="hs-comment">-- | Make sure all blocks we want the layout algorithm to place have been placed.</span><span>
</span><span id="line-809"></span><span id="local-6989586621681044936"><span id="local-6989586621681044937"><span class="annot"><a href="GHC.CmmToAsm.html#checkLayout"><span class="hs-identifier hs-type">checkLayout</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#NatCmmDecl"><span class="hs-identifier hs-type">NatCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044937"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044936"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#NatCmmDecl"><span class="hs-identifier hs-type">NatCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044937"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044936"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-810"></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#NatCmmDecl"><span class="hs-identifier hs-type">NatCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044937"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044936"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">]</span></span></span><span>
</span><span id="line-811"></span><span id="checkLayout"><span class="annot"><span class="annottext">checkLayout :: forall statics instr.
[NatCmmDecl statics instr]
-&gt; [NatCmmDecl statics instr] -&gt; [NatCmmDecl statics instr]
</span><a href="GHC.CmmToAsm.html#checkLayout"><span class="hs-identifier hs-var hs-var">checkLayout</span></a></span></span><span> </span><span id="local-6989586621681044032"><span class="annot"><span class="annottext">[NatCmmDecl statics instr]
</span><a href="#local-6989586621681044032"><span class="hs-identifier hs-var">procsUnsequenced</span></a></span></span><span> </span><span id="local-6989586621681044031"><span class="annot"><span class="annottext">[NatCmmDecl statics instr]
</span><a href="#local-6989586621681044031"><span class="hs-identifier hs-var">procsSequenced</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-812"></span><span>        </span><span class="hs-identifier">ASSERT2</span><span class="hs-special">(</span><span class="hs-identifier">setNull</span><span> </span><span class="hs-identifier">diff</span><span class="hs-special">,</span><span>
</span><span id="line-813"></span><span>                </span><span class="hs-identifier">ppr</span><span> </span><span class="hs-string">&quot;Block sequencing dropped blocks:&quot;</span><span> </span><span class="hs-operator">&lt;&gt;</span><span> </span><span class="hs-identifier">ppr</span><span> </span><span class="hs-identifier">diff</span><span class="hs-special">)</span><span>
</span><span id="line-814"></span><span>        </span><span class="annot"><span class="annottext">[NatCmmDecl statics instr]
</span><a href="#local-6989586621681044031"><span class="hs-identifier hs-var">procsSequenced</span></a></span><span>
</span><span id="line-815"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-816"></span><span>        </span><span id="local-6989586621681044027"><span class="annot"><span class="annottext">blocks1 :: LabelSet
</span><a href="#local-6989586621681044027"><span class="hs-identifier hs-var hs-var">blocks1</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(LabelSet -&gt; LabelSet -&gt; LabelSet)
-&gt; LabelSet -&gt; [LabelSet] -&gt; LabelSet
forall (t :: * -&gt; *) b a.
Foldable t =&gt;
(b -&gt; a -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldl%27"><span class="hs-identifier hs-var">foldl'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LabelSet -&gt; LabelSet -&gt; LabelSet
forall set. IsSet set =&gt; set -&gt; set -&gt; set
</span><a href="GHC.Cmm.Dataflow.Collections.html#setUnion"><span class="hs-identifier hs-var">setUnion</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">LabelSet
forall set. IsSet set =&gt; set
</span><a href="GHC.Cmm.Dataflow.Collections.html#setEmpty"><span class="hs-identifier hs-var">setEmpty</span></a></span><span> </span><span class="annot"><span class="annottext">([LabelSet] -&gt; LabelSet) -&gt; [LabelSet] -&gt; LabelSet
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-817"></span><span>                        </span><span class="annot"><span class="annottext">(NatCmmDecl statics instr -&gt; LabelSet)
-&gt; [NatCmmDecl statics instr] -&gt; [LabelSet]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">NatCmmDecl statics instr -&gt; LabelSet
forall {set} {d} {h} {i}.
(IsSet set, ElemOf set ~ BlockId) =&gt;
GenCmmDecl d h (ListGraph i) -&gt; set
</span><a href="#local-6989586621681044024"><span class="hs-identifier hs-var">getBlockIds</span></a></span><span> </span><span class="annot"><span class="annottext">[NatCmmDecl statics instr]
</span><a href="#local-6989586621681044032"><span class="hs-identifier hs-var">procsUnsequenced</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#LabelSet"><span class="hs-identifier hs-type">LabelSet</span></a></span><span>
</span><span id="line-818"></span><span>        </span><span id="local-6989586621681044023"><span class="annot"><span class="annottext">blocks2 :: LabelSet
</span><a href="#local-6989586621681044023"><span class="hs-identifier hs-var hs-var">blocks2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(LabelSet -&gt; LabelSet -&gt; LabelSet)
-&gt; LabelSet -&gt; [LabelSet] -&gt; LabelSet
forall (t :: * -&gt; *) b a.
Foldable t =&gt;
(b -&gt; a -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldl%27"><span class="hs-identifier hs-var">foldl'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LabelSet -&gt; LabelSet -&gt; LabelSet
forall set. IsSet set =&gt; set -&gt; set -&gt; set
</span><a href="GHC.Cmm.Dataflow.Collections.html#setUnion"><span class="hs-identifier hs-var">setUnion</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">LabelSet
forall set. IsSet set =&gt; set
</span><a href="GHC.Cmm.Dataflow.Collections.html#setEmpty"><span class="hs-identifier hs-var">setEmpty</span></a></span><span> </span><span class="annot"><span class="annottext">([LabelSet] -&gt; LabelSet) -&gt; [LabelSet] -&gt; LabelSet
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-819"></span><span>                        </span><span class="annot"><span class="annottext">(NatCmmDecl statics instr -&gt; LabelSet)
-&gt; [NatCmmDecl statics instr] -&gt; [LabelSet]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">NatCmmDecl statics instr -&gt; LabelSet
forall {set} {d} {h} {i}.
(IsSet set, ElemOf set ~ BlockId) =&gt;
GenCmmDecl d h (ListGraph i) -&gt; set
</span><a href="#local-6989586621681044024"><span class="hs-identifier hs-var">getBlockIds</span></a></span><span> </span><span class="annot"><span class="annottext">[NatCmmDecl statics instr]
</span><a href="#local-6989586621681044031"><span class="hs-identifier hs-var">procsSequenced</span></a></span><span>
</span><span id="line-820"></span><span>        </span><span id="local-6989586621681044029"><span class="annot"><span class="annottext">diff :: LabelSet
</span><a href="#local-6989586621681044029"><span class="hs-identifier hs-var hs-var">diff</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LabelSet -&gt; LabelSet -&gt; LabelSet
forall set. IsSet set =&gt; set -&gt; set -&gt; set
</span><a href="GHC.Cmm.Dataflow.Collections.html#setDifference"><span class="hs-identifier hs-var">setDifference</span></a></span><span> </span><span class="annot"><span class="annottext">LabelSet
</span><a href="#local-6989586621681044027"><span class="hs-identifier hs-var">blocks1</span></a></span><span> </span><span class="annot"><span class="annottext">LabelSet
</span><a href="#local-6989586621681044023"><span class="hs-identifier hs-var">blocks2</span></a></span><span>
</span><span id="line-821"></span><span>
</span><span id="line-822"></span><span>        </span><span id="local-6989586621681044024"><span class="annot"><span class="annottext">getBlockIds :: GenCmmDecl d h (ListGraph i) -&gt; set
</span><a href="#local-6989586621681044024"><span class="hs-identifier hs-var hs-var">getBlockIds</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#CmmData"><span class="hs-identifier hs-type">CmmData</span></a></span><span> </span><span class="annot"><span class="annottext">Section
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">d
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">set
forall set. IsSet set =&gt; set
</span><a href="GHC.Cmm.Dataflow.Collections.html#setEmpty"><span class="hs-identifier hs-var">setEmpty</span></a></span><span>
</span><span id="line-823"></span><span>        </span><span class="annot"><a href="#local-6989586621681044024"><span class="hs-identifier hs-var">getBlockIds</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#CmmProc"><span class="hs-identifier hs-type">CmmProc</span></a></span><span> </span><span class="annot"><span class="annottext">h
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[GlobalReg]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#ListGraph"><span class="hs-identifier hs-type">ListGraph</span></a></span><span> </span><span id="local-6989586621681044014"><span class="annot"><span class="annottext">[GenBasicBlock i]
</span><a href="#local-6989586621681044014"><span class="hs-identifier hs-var">blocks</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-824"></span><span>                </span><span class="annot"><span class="annottext">[ElemOf set] -&gt; set
forall set. IsSet set =&gt; [ElemOf set] -&gt; set
</span><a href="GHC.Cmm.Dataflow.Collections.html#setFromList"><span class="hs-identifier hs-var">setFromList</span></a></span><span> </span><span class="annot"><span class="annottext">([ElemOf set] -&gt; set) -&gt; [ElemOf set] -&gt; set
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(GenBasicBlock i -&gt; BlockId) -&gt; [GenBasicBlock i] -&gt; [BlockId]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">GenBasicBlock i -&gt; BlockId
forall i. GenBasicBlock i -&gt; BlockId
</span><a href="GHC.Cmm.html#blockId"><span class="hs-identifier hs-var">blockId</span></a></span><span> </span><span class="annot"><span class="annottext">[GenBasicBlock i]
</span><a href="#local-6989586621681044014"><span class="hs-identifier hs-var">blocks</span></a></span><span>
</span><span id="line-825"></span><span>
</span><span id="line-826"></span><span class="hs-comment">-- | Compute unwinding tables for the blocks of a procedure</span><span>
</span><span id="line-827"></span><span id="local-6989586621681044926"><span id="local-6989586621681044927"><span id="local-6989586621681044928"><span class="annot"><a href="GHC.CmmToAsm.html#computeUnwinding"><span class="hs-identifier hs-type">computeUnwinding</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#Instruction"><span class="hs-identifier hs-type">Instruction</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044928"><span class="hs-identifier hs-type">instr</span></a></span><span>
</span><span id="line-828"></span><span>                 </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Monad.html#NcgImpl"><span class="hs-identifier hs-type">NcgImpl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044927"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044928"><span class="hs-identifier hs-type">instr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044926"><span class="hs-identifier hs-type">jumpDest</span></a></span><span>
</span><span id="line-829"></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#NatCmmDecl"><span class="hs-identifier hs-type">NatCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044927"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044928"><span class="hs-identifier hs-type">instr</span></a></span><span>
</span><span id="line-830"></span><span>                    </span><span class="hs-comment">-- ^ the native code generated for the procedure</span><span>
</span><span id="line-831"></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#LabelMap"><span class="hs-identifier hs-type">LabelMap</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UnwindPoint"><span class="hs-identifier hs-type">UnwindPoint</span></a></span><span class="hs-special">]</span></span></span></span><span>
</span><span id="line-832"></span><span>                    </span><span class="hs-comment">-- ^ unwinding tables for all points of all blocks of the</span><span>
</span><span id="line-833"></span><span>                    </span><span class="hs-comment">-- procedure</span><span>
</span><span id="line-834"></span><span id="computeUnwinding"><span class="annot"><span class="annottext">computeUnwinding :: forall instr statics jumpDest.
Instruction instr =&gt;
DynFlags
-&gt; NcgImpl statics instr jumpDest
-&gt; NatCmmDecl statics instr
-&gt; LabelMap [UnwindPoint]
</span><a href="GHC.CmmToAsm.html#computeUnwinding"><span class="hs-identifier hs-var hs-var">computeUnwinding</span></a></span></span><span> </span><span id="local-6989586621681044006"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044006"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">NatCmmDecl statics instr
</span><span class="hs-identifier">_</span></span><span>
</span><span id="line-835"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; Int
</span><a href="GHC.Driver.Session.html#debugLevel"><span class="hs-identifier hs-var hs-var">debugLevel</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681044006"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LabelMap [UnwindPoint]
forall (map :: * -&gt; *) a. IsMap map =&gt; map a
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapEmpty"><span class="hs-identifier hs-var">mapEmpty</span></a></span><span>
</span><span id="line-836"></span><span class="annot"><a href="GHC.CmmToAsm.html#computeUnwinding"><span class="hs-identifier hs-var">computeUnwinding</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#CmmData"><span class="hs-identifier hs-type">CmmData</span></a></span><span> </span><span class="annot"><span class="annottext">Section
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">statics
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LabelMap [UnwindPoint]
forall (map :: * -&gt; *) a. IsMap map =&gt; map a
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapEmpty"><span class="hs-identifier hs-var">mapEmpty</span></a></span><span>
</span><span id="line-837"></span><span class="annot"><a href="GHC.CmmToAsm.html#computeUnwinding"><span class="hs-identifier hs-var">computeUnwinding</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681044005"><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
</span><a href="#local-6989586621681044005"><span class="hs-identifier hs-var">ncgImpl</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#CmmProc"><span class="hs-identifier hs-type">CmmProc</span></a></span><span> </span><span class="annot"><span class="annottext">LabelMap RawCmmStatics
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[GlobalReg]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#ListGraph"><span class="hs-identifier hs-type">ListGraph</span></a></span><span> </span><span id="local-6989586621681044004"><span class="annot"><span class="annottext">[GenBasicBlock instr]
</span><a href="#local-6989586621681044004"><span class="hs-identifier hs-var">blks</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-838"></span><span>    </span><span class="hs-comment">-- In general we would need to push unwinding information down the</span><span>
</span><span id="line-839"></span><span>    </span><span class="hs-comment">-- block-level call-graph to ensure that we fully account for all</span><span>
</span><span id="line-840"></span><span>    </span><span class="hs-comment">-- relevant register writes within a procedure.</span><span>
</span><span id="line-841"></span><span>    </span><span class="hs-comment">--</span><span>
</span><span id="line-842"></span><span>    </span><span class="hs-comment">-- However, the only unwinding information that we care about in GHC is for</span><span>
</span><span id="line-843"></span><span>    </span><span class="hs-comment">-- Sp. The fact that GHC.Cmm.LayoutStack already ensures that we have unwind</span><span>
</span><span id="line-844"></span><span>    </span><span class="hs-comment">-- information at the beginning of every block means that there is no need</span><span>
</span><span id="line-845"></span><span>    </span><span class="hs-comment">-- to perform this sort of push-down.</span><span>
</span><span id="line-846"></span><span>    </span><span class="annot"><span class="annottext">[(KeyOf LabelMap, [UnwindPoint])] -&gt; LabelMap [UnwindPoint]
forall (map :: * -&gt; *) a. IsMap map =&gt; [(KeyOf map, a)] -&gt; map a
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapFromList"><span class="hs-identifier hs-var">mapFromList</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">KeyOf LabelMap
BlockId
</span><a href="#local-6989586621681044002"><span class="hs-identifier hs-var">blk_lbl</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest -&gt; [instr] -&gt; [UnwindPoint]
forall statics instr jumpDest.
NcgImpl statics instr jumpDest -&gt; [instr] -&gt; [UnwindPoint]
</span><a href="GHC.CmmToAsm.Monad.html#extractUnwindPoints"><span class="hs-identifier hs-var hs-var">extractUnwindPoints</span></a></span><span> </span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
</span><a href="#local-6989586621681044005"><span class="hs-identifier hs-var">ncgImpl</span></a></span><span> </span><span class="annot"><span class="annottext">[instr]
</span><a href="#local-6989586621681044001"><span class="hs-identifier hs-var">instrs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-847"></span><span>                </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="GHC.Cmm.html#BasicBlock"><span class="hs-identifier hs-type">BasicBlock</span></a></span><span> </span><span id="local-6989586621681044002"><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681044002"><span class="hs-identifier hs-var">blk_lbl</span></a></span></span><span> </span><span id="local-6989586621681044001"><span class="annot"><span class="annottext">[instr]
</span><a href="#local-6989586621681044001"><span class="hs-identifier hs-var">instrs</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[GenBasicBlock instr]
</span><a href="#local-6989586621681044004"><span class="hs-identifier hs-var">blks</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-848"></span><span>
</span><span id="line-849"></span><span class="hs-comment">-- | Build a doc for all the imports.</span><span>
</span><span id="line-850"></span><span class="hs-comment">--</span><span>
</span><span id="line-851"></span><span class="annot"><a href="GHC.CmmToAsm.html#makeImportsDoc"><span class="hs-identifier hs-type">makeImportsDoc</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.CLabel.html#CLabel"><span class="hs-identifier hs-type">CLabel</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-852"></span><span id="makeImportsDoc"><span class="annot"><span class="annottext">makeImportsDoc :: DynFlags -&gt; [CLabel] -&gt; SDoc
</span><a href="GHC.CmmToAsm.html#makeImportsDoc"><span class="hs-identifier hs-var hs-var">makeImportsDoc</span></a></span></span><span> </span><span id="local-6989586621681043999"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681043999"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681043998"><span class="annot"><span class="annottext">[CLabel]
</span><a href="#local-6989586621681043998"><span class="hs-identifier hs-var">imports</span></a></span></span><span>
</span><span id="line-853"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[CLabel] -&gt; SDoc
</span><a href="#local-6989586621681043997"><span class="hs-identifier hs-var">dyld_stubs</span></a></span><span> </span><span class="annot"><span class="annottext">[CLabel]
</span><a href="#local-6989586621681043998"><span class="hs-identifier hs-var">imports</span></a></span><span>
</span><span id="line-854"></span><span>            </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span>
</span><span id="line-855"></span><span>            </span><span class="hs-comment">-- On recent versions of Darwin, the linker supports</span><span>
</span><span id="line-856"></span><span>            </span><span class="hs-comment">-- dead-stripping of code and data on a per-symbol basis.</span><span>
</span><span id="line-857"></span><span>            </span><span class="hs-comment">-- There's a hack to make this work in PprMach.pprNatCmmDecl.</span><span>
</span><span id="line-858"></span><span>            </span><span class="hs-special">(</span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Bool
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformHasSubsectionsViaSymbols"><span class="hs-identifier hs-var hs-var">platformHasSubsectionsViaSymbols</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681043995"><span class="hs-identifier hs-var">platform</span></a></span><span>
</span><span id="line-859"></span><span>             </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.subsections_via_symbols&quot;</span></span><span>
</span><span id="line-860"></span><span>             </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#empty"><span class="hs-identifier hs-var">Outputable.empty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-861"></span><span>            </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span>
</span><span id="line-862"></span><span>                </span><span class="hs-comment">-- On recent GNU ELF systems one can mark an object file</span><span>
</span><span id="line-863"></span><span>                </span><span class="hs-comment">-- as not requiring an executable stack. If all objects</span><span>
</span><span id="line-864"></span><span>                </span><span class="hs-comment">-- linked into a program have this note then the program</span><span>
</span><span id="line-865"></span><span>                </span><span class="hs-comment">-- will not use an executable stack, which is good for</span><span>
</span><span id="line-866"></span><span>                </span><span class="hs-comment">-- security. GHC generated code does not need an executable</span><span>
</span><span id="line-867"></span><span>                </span><span class="hs-comment">-- stack so add the note in:</span><span>
</span><span id="line-868"></span><span>            </span><span class="hs-special">(</span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Bool
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformHasGnuNonexecStack"><span class="hs-identifier hs-var hs-var">platformHasGnuNonexecStack</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681043995"><span class="hs-identifier hs-var">platform</span></a></span><span>
</span><span id="line-869"></span><span>             </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.section .note.GNU-stack,\&quot;\&quot;,&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Platform -&gt; String -&gt; SDoc
</span><a href="GHC.Utils.Asm.html#sectionType"><span class="hs-identifier hs-var">sectionType</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681043995"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;progbits&quot;</span></span><span>
</span><span id="line-870"></span><span>             </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#empty"><span class="hs-identifier hs-var">Outputable.empty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-871"></span><span>            </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span>
</span><span id="line-872"></span><span>                </span><span class="hs-comment">-- And just because every other compiler does, let's stick in</span><span>
</span><span id="line-873"></span><span>                </span><span class="hs-comment">-- an identifier directive: .ident &quot;GHC x.y.z&quot;</span><span>
</span><span id="line-874"></span><span>            </span><span class="hs-special">(</span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Bool
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformHasIdentDirective"><span class="hs-identifier hs-var hs-var">platformHasIdentDirective</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681043995"><span class="hs-identifier hs-var">platform</span></a></span><span>
</span><span id="line-875"></span><span>             </span><span class="hs-keyword">then</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681043990"><span class="annot"><span class="annottext">compilerIdent :: SDoc
</span><a href="#local-6989586621681043990"><span class="hs-identifier hs-var hs-var">compilerIdent</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;GHC&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="../../ghc-boot/src/GHC.Version.html#cProjectVersion"><span class="hs-identifier hs-var">cProjectVersion</span></a></span><span>
</span><span id="line-876"></span><span>                   </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.ident&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#doubleQuotes"><span class="hs-identifier hs-var">doubleQuotes</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681043990"><span class="hs-identifier hs-var">compilerIdent</span></a></span><span>
</span><span id="line-877"></span><span>             </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#empty"><span class="hs-identifier hs-var">Outputable.empty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-878"></span><span>
</span><span id="line-879"></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-880"></span><span>        </span><span id="local-6989586621681043987"><span class="annot"><span class="annottext">config :: NCGConfig
</span><a href="#local-6989586621681043987"><span class="hs-identifier hs-var hs-var">config</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; NCGConfig
</span><a href="GHC.CmmToAsm.Monad.html#initConfig"><span class="hs-identifier hs-var">initConfig</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681043999"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-881"></span><span>        </span><span id="local-6989586621681043995"><span class="annot"><span class="annottext">platform :: Platform
</span><a href="#local-6989586621681043995"><span class="hs-identifier hs-var hs-var">platform</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NCGConfig -&gt; Platform
</span><a href="GHC.CmmToAsm.Config.html#ncgPlatform"><span class="hs-identifier hs-var hs-var">ncgPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681043987"><span class="hs-identifier hs-var">config</span></a></span><span>
</span><span id="line-882"></span><span>
</span><span id="line-883"></span><span>        </span><span class="hs-comment">-- Generate &quot;symbol stubs&quot; for all external symbols that might</span><span>
</span><span id="line-884"></span><span>        </span><span class="hs-comment">-- come from a dynamic library.</span><span>
</span><span id="line-885"></span><span>        </span><span class="annot"><a href="#local-6989586621681043997"><span class="hs-identifier hs-type">dyld_stubs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.CLabel.html#CLabel"><span class="hs-identifier hs-type">CLabel</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-886"></span><span class="hs-comment">{-      dyld_stubs imps = vcat $ map pprDyldSymbolStub $
                                    map head $ group $ sort imps-}</span><span>
</span><span id="line-888"></span><span>        </span><span class="hs-comment">-- (Hack) sometimes two Labels pretty-print the same, but have</span><span>
</span><span id="line-889"></span><span>        </span><span class="hs-comment">-- different uniques; so we compare their text versions...</span><span>
</span><span id="line-890"></span><span>        </span><span id="local-6989586621681043997"><span class="annot"><span class="annottext">dyld_stubs :: [CLabel] -&gt; SDoc
</span><a href="#local-6989586621681043997"><span class="hs-identifier hs-var hs-var">dyld_stubs</span></a></span></span><span> </span><span id="local-6989586621681043986"><span class="annot"><span class="annottext">[CLabel]
</span><a href="#local-6989586621681043986"><span class="hs-identifier hs-var">imps</span></a></span></span><span>
</span><span id="line-891"></span><span>                </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">NCGConfig -&gt; Bool
</span><a href="GHC.CmmToAsm.PIC.html#needImportedSymbols"><span class="hs-identifier hs-var">needImportedSymbols</span></a></span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681043987"><span class="hs-identifier hs-var">config</span></a></span><span>
</span><span id="line-892"></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="annot"><span class="annottext">([SDoc] -&gt; SDoc) -&gt; [SDoc] -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-893"></span><span>                        </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NCGConfig -&gt; SDoc
</span><a href="GHC.CmmToAsm.PIC.html#pprGotDeclaration"><span class="hs-identifier hs-var">pprGotDeclaration</span></a></span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681043987"><span class="hs-identifier hs-var">config</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; [SDoc] -&gt; [SDoc]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([SDoc] -&gt; [SDoc]) -&gt; [SDoc] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-894"></span><span>                        </span><span class="annot"><span class="annottext">([(CLabel, String)] -&gt; SDoc) -&gt; [[(CLabel, String)]] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; NCGConfig -&gt; CLabel -&gt; SDoc
</span><a href="GHC.CmmToAsm.PIC.html#pprImportedSymbol"><span class="hs-identifier hs-var">pprImportedSymbol</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681043999"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681043987"><span class="hs-identifier hs-var">config</span></a></span><span> </span><span class="annot"><span class="annottext">(CLabel -&gt; SDoc)
-&gt; ([(CLabel, String)] -&gt; CLabel) -&gt; [(CLabel, String)] -&gt; SDoc
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(CLabel, String) -&gt; CLabel
forall a b. (a, b) -&gt; a
</span><a href="../../base/src/Data.Tuple.html#fst"><span class="hs-identifier hs-var">fst</span></a></span><span> </span><span class="annot"><span class="annottext">((CLabel, String) -&gt; CLabel)
-&gt; ([(CLabel, String)] -&gt; (CLabel, String))
-&gt; [(CLabel, String)]
-&gt; CLabel
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[(CLabel, String)] -&gt; (CLabel, String)
forall a. [a] -&gt; a
</span><a href="../../base/src/GHC.List.html#head"><span class="hs-identifier hs-var">head</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([[(CLabel, String)]] -&gt; [SDoc]) -&gt; [[(CLabel, String)]] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-895"></span><span>                        </span><span class="annot"><span class="annottext">((CLabel, String) -&gt; (CLabel, String) -&gt; Bool)
-&gt; [(CLabel, String)] -&gt; [[(CLabel, String)]]
forall a. (a -&gt; a -&gt; Bool) -&gt; [a] -&gt; [[a]]
</span><a href="../../base/src/Data.OldList.html#groupBy"><span class="hs-identifier hs-var">groupBy</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span class="annot"><span class="annottext">CLabel
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span id="local-6989586621681043979"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681043979"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CLabel
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span id="local-6989586621681043978"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681043978"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681043979"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681043978"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([(CLabel, String)] -&gt; [[(CLabel, String)]])
-&gt; [(CLabel, String)] -&gt; [[(CLabel, String)]]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-896"></span><span>                        </span><span class="annot"><span class="annottext">((CLabel, String) -&gt; (CLabel, String) -&gt; Ordering)
-&gt; [(CLabel, String)] -&gt; [(CLabel, String)]
forall a. (a -&gt; a -&gt; Ordering) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#sortBy"><span class="hs-identifier hs-var">sortBy</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span class="annot"><span class="annottext">CLabel
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span id="local-6989586621681043977"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681043977"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CLabel
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span id="local-6989586621681043976"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681043976"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><span class="hs-identifier hs-var">compare</span></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681043977"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681043976"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([(CLabel, String)] -&gt; [(CLabel, String)])
-&gt; [(CLabel, String)] -&gt; [(CLabel, String)]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-897"></span><span>                        </span><span class="annot"><span class="annottext">(CLabel -&gt; (CLabel, String)) -&gt; [CLabel] -&gt; [(CLabel, String)]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel -&gt; (CLabel, String)
</span><a href="#local-6989586621681043974"><span class="hs-identifier hs-var">doPpr</span></a></span><span> </span><span class="annot"><span class="annottext">([CLabel] -&gt; [(CLabel, String)]) -&gt; [CLabel] -&gt; [(CLabel, String)]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-898"></span><span>                        </span><span class="annot"><span class="annottext">[CLabel]
</span><a href="#local-6989586621681043986"><span class="hs-identifier hs-var">imps</span></a></span><span>
</span><span id="line-899"></span><span>                </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-900"></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#empty"><span class="hs-identifier hs-var">Outputable.empty</span></a></span><span>
</span><span id="line-901"></span><span>
</span><span id="line-902"></span><span>        </span><span id="local-6989586621681043974"><span class="annot"><span class="annottext">doPpr :: CLabel -&gt; (CLabel, String)
</span><a href="#local-6989586621681043974"><span class="hs-identifier hs-var hs-var">doPpr</span></a></span></span><span> </span><span id="local-6989586621681043973"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681043973"><span class="hs-identifier hs-var">lbl</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681043973"><span class="hs-identifier hs-var">lbl</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">SDocContext -&gt; SDoc -&gt; String
</span><a href="GHC.Utils.Outputable.html#renderWithStyle"><span class="hs-identifier hs-var">renderWithStyle</span></a></span><span>
</span><span id="line-903"></span><span>                              </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; PprStyle -&gt; SDocContext
</span><a href="GHC.Driver.Session.html#initSDocContext"><span class="hs-identifier hs-var">initSDocContext</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681043999"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">PprStyle
</span><a href="#local-6989586621681043971"><span class="hs-identifier hs-var">astyle</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-904"></span><span>                              </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; CLabel -&gt; SDoc
</span><a href="GHC.Cmm.CLabel.html#pprCLabel"><span class="hs-identifier hs-var">pprCLabel</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681043999"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681043973"><span class="hs-identifier hs-var">lbl</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-905"></span><span>        </span><span id="local-6989586621681043971"><span class="annot"><span class="annottext">astyle :: PprStyle
</span><a href="#local-6989586621681043971"><span class="hs-identifier hs-var hs-var">astyle</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CodeStyle -&gt; PprStyle
</span><a href="GHC.Utils.Outputable.html#mkCodeStyle"><span class="hs-identifier hs-var">mkCodeStyle</span></a></span><span> </span><span class="annot"><span class="annottext">CodeStyle
</span><a href="GHC.Utils.Outputable.html#AsmStyle"><span class="hs-identifier hs-var">AsmStyle</span></a></span><span>
</span><span id="line-906"></span><span>
</span><span id="line-907"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-908"></span><span class="hs-comment">-- Generate jump tables</span><span>
</span><span id="line-909"></span><span>
</span><span id="line-910"></span><span class="hs-comment">-- Analyzes all native code and generates data sections for all jump</span><span>
</span><span id="line-911"></span><span class="hs-comment">-- table instructions.</span><span>
</span><span id="line-912"></span><span id="local-6989586621681044952"><span id="local-6989586621681044953"><span id="local-6989586621681044954"><span class="annot"><a href="GHC.CmmToAsm.html#generateJumpTables"><span class="hs-identifier hs-type">generateJumpTables</span></a></span><span>
</span><span id="line-913"></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Monad.html#NcgImpl"><span class="hs-identifier hs-type">NcgImpl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044954"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044953"><span class="hs-identifier hs-type">instr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044952"><span class="hs-identifier hs-type">jumpDest</span></a></span><span>
</span><span id="line-914"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#NatCmmDecl"><span class="hs-identifier hs-type">NatCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044954"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044953"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#NatCmmDecl"><span class="hs-identifier hs-type">NatCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044954"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044953"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">]</span></span></span></span><span>
</span><span id="line-915"></span><span id="generateJumpTables"><span class="annot"><span class="annottext">generateJumpTables :: forall statics instr jumpDest.
NcgImpl statics instr jumpDest
-&gt; [NatCmmDecl statics instr] -&gt; [NatCmmDecl statics instr]
</span><a href="GHC.CmmToAsm.html#generateJumpTables"><span class="hs-identifier hs-var hs-var">generateJumpTables</span></a></span></span><span> </span><span id="local-6989586621681043967"><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
</span><a href="#local-6989586621681043967"><span class="hs-identifier hs-var">ncgImpl</span></a></span></span><span> </span><span id="local-6989586621681043966"><span class="annot"><span class="annottext">[NatCmmDecl statics instr]
</span><a href="#local-6989586621681043966"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(NatCmmDecl statics instr -&gt; [NatCmmDecl statics instr])
-&gt; [NatCmmDecl statics instr] -&gt; [NatCmmDecl statics instr]
forall (t :: * -&gt; *) a b. Foldable t =&gt; (a -&gt; [b]) -&gt; t a -&gt; [b]
</span><a href="../../base/src/Data.Foldable.html#concatMap"><span class="hs-identifier hs-var">concatMap</span></a></span><span> </span><span class="annot"><span class="annottext">NatCmmDecl statics instr -&gt; [NatCmmDecl statics instr]
</span><a href="#local-6989586621681043965"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">[NatCmmDecl statics instr]
</span><a href="#local-6989586621681043966"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-916"></span><span>    </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621681043965"><span class="annot"><span class="annottext">f :: NatCmmDecl statics instr -&gt; [NatCmmDecl statics instr]
</span><a href="#local-6989586621681043965"><span class="hs-identifier hs-var hs-var">f</span></a></span></span><span> </span><span id="local-6989586621681043964"><span class="annot"><span class="annottext">p :: NatCmmDecl statics instr
</span><a href="#local-6989586621681043964"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#CmmProc"><span class="hs-identifier hs-type">CmmProc</span></a></span><span> </span><span class="annot"><span class="annottext">LabelMap RawCmmStatics
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[GlobalReg]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#ListGraph"><span class="hs-identifier hs-type">ListGraph</span></a></span><span> </span><span id="local-6989586621681043963"><span class="annot"><span class="annottext">[GenBasicBlock instr]
</span><a href="#local-6989586621681043963"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NatCmmDecl statics instr
</span><a href="#local-6989586621681043964"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">NatCmmDecl statics instr
-&gt; [NatCmmDecl statics instr] -&gt; [NatCmmDecl statics instr]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">(GenBasicBlock instr -&gt; [NatCmmDecl statics instr])
-&gt; [GenBasicBlock instr] -&gt; [NatCmmDecl statics instr]
forall (t :: * -&gt; *) a b. Foldable t =&gt; (a -&gt; [b]) -&gt; t a -&gt; [b]
</span><a href="../../base/src/Data.Foldable.html#concatMap"><span class="hs-identifier hs-var">concatMap</span></a></span><span> </span><span class="annot"><span class="annottext">GenBasicBlock instr -&gt; [NatCmmDecl statics instr]
</span><a href="#local-6989586621681043962"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">[GenBasicBlock instr]
</span><a href="#local-6989586621681043963"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-917"></span><span>          </span><span class="annot"><a href="#local-6989586621681043965"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span id="local-6989586621681043961"><span class="annot"><span class="annottext">NatCmmDecl statics instr
</span><a href="#local-6989586621681043961"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">NatCmmDecl statics instr
</span><a href="#local-6989586621681043961"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-918"></span><span>          </span><span id="local-6989586621681043962"><span class="annot"><span class="annottext">g :: GenBasicBlock instr -&gt; [NatCmmDecl statics instr]
</span><a href="#local-6989586621681043962"><span class="hs-identifier hs-var hs-var">g</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#BasicBlock"><span class="hs-identifier hs-type">BasicBlock</span></a></span><span> </span><span class="annot"><span class="annottext">BlockId
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681043960"><span class="annot"><span class="annottext">[instr]
</span><a href="#local-6989586621681043960"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Maybe (NatCmmDecl statics instr)] -&gt; [NatCmmDecl statics instr]
forall a. [Maybe a] -&gt; [a]
</span><a href="../../base/src/Data.Maybe.html#catMaybes"><span class="hs-identifier hs-var">catMaybes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(instr -&gt; Maybe (NatCmmDecl statics instr))
-&gt; [instr] -&gt; [Maybe (NatCmmDecl statics instr)]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
-&gt; instr -&gt; Maybe (NatCmmDecl statics instr)
forall statics instr jumpDest.
NcgImpl statics instr jumpDest
-&gt; instr -&gt; Maybe (NatCmmDecl statics instr)
</span><a href="GHC.CmmToAsm.Monad.html#generateJumpTableForInstr"><span class="hs-identifier hs-var hs-var">generateJumpTableForInstr</span></a></span><span> </span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
</span><a href="#local-6989586621681043967"><span class="hs-identifier hs-var">ncgImpl</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[instr]
</span><a href="#local-6989586621681043960"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-919"></span><span>
</span><span id="line-920"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-921"></span><span class="hs-comment">-- Shortcut branches</span><span>
</span><span id="line-922"></span><span>
</span><span id="line-923"></span><span class="annot"><a href="GHC.CmmToAsm.html#shortcutBranches"><span class="hs-identifier hs-type">shortcutBranches</span></a></span><span>
</span><span id="line-924"></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="hs-keyword">forall</span><span> </span><span id="local-6989586621681044950"><span class="annot"><a href="#local-6989586621681044950"><span class="hs-identifier hs-type">statics</span></a></span></span><span> </span><span id="local-6989586621681044949"><span class="annot"><a href="#local-6989586621681044949"><span class="hs-identifier hs-type">instr</span></a></span></span><span> </span><span id="local-6989586621681044951"><span class="annot"><a href="#local-6989586621681044951"><span class="hs-identifier hs-type">jumpDest</span></a></span></span><span class="hs-operator">.</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044951"><span class="hs-identifier hs-type">jumpDest</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span>
</span><span id="line-925"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Monad.html#NcgImpl"><span class="hs-identifier hs-type">NcgImpl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044950"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044949"><span class="hs-identifier hs-type">instr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044951"><span class="hs-identifier hs-type">jumpDest</span></a></span><span>
</span><span id="line-926"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#NatCmmDecl"><span class="hs-identifier hs-type">NatCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044950"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044949"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-927"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.CFG.html#CFG"><span class="hs-identifier hs-type">CFG</span></a></span><span>
</span><span id="line-928"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#NatCmmDecl"><span class="hs-identifier hs-type">NatCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044950"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044949"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.CFG.html#CFG"><span class="hs-identifier hs-type">CFG</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-929"></span><span>
</span><span id="line-930"></span><span id="shortcutBranches"><span class="annot"><span class="annottext">shortcutBranches :: forall statics instr jumpDest.
Outputable jumpDest =&gt;
DynFlags
-&gt; NcgImpl statics instr jumpDest
-&gt; [NatCmmDecl statics instr]
-&gt; Maybe CFG
-&gt; ([NatCmmDecl statics instr], Maybe CFG)
</span><a href="GHC.CmmToAsm.html#shortcutBranches"><span class="hs-identifier hs-var hs-var">shortcutBranches</span></a></span></span><span> </span><span id="local-6989586621681043954"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681043954"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681043953"><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
</span><a href="#local-6989586621681043953"><span class="hs-identifier hs-var">ncgImpl</span></a></span></span><span> </span><span id="local-6989586621681043952"><span class="annot"><span class="annottext">[NatCmmDecl statics instr]
</span><a href="#local-6989586621681043952"><span class="hs-identifier hs-var">tops</span></a></span></span><span> </span><span id="local-6989586621681043951"><span class="annot"><span class="annottext">Maybe CFG
</span><a href="#local-6989586621681043951"><span class="hs-identifier hs-var">weights</span></a></span></span><span>
</span><span id="line-931"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">GeneralFlag -&gt; DynFlags -&gt; Bool
</span><a href="GHC.Driver.Session.html#gopt"><span class="hs-identifier hs-var">gopt</span></a></span><span> </span><span class="annot"><span class="annottext">GeneralFlag
</span><a href="GHC.Driver.Flags.html#Opt_AsmShortcutting"><span class="hs-identifier hs-var">Opt_AsmShortcutting</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681043954"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-932"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><span class="annottext">(NatCmmDecl statics instr -&gt; NatCmmDecl statics instr)
-&gt; [NatCmmDecl statics instr] -&gt; [NatCmmDecl statics instr]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
-&gt; LabelMap jumpDest
-&gt; NatCmmDecl statics instr
-&gt; NatCmmDecl statics instr
forall statics instr jumpDest h.
NcgImpl statics instr jumpDest
-&gt; LabelMap jumpDest
-&gt; GenCmmDecl statics h (ListGraph instr)
-&gt; GenCmmDecl statics h (ListGraph instr)
</span><a href="GHC.CmmToAsm.html#apply_mapping"><span class="hs-identifier hs-var">apply_mapping</span></a></span><span> </span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
</span><a href="#local-6989586621681043953"><span class="hs-identifier hs-var">ncgImpl</span></a></span><span> </span><span class="annot"><span class="annottext">LabelMap jumpDest
</span><a href="#local-6989586621681043948"><span class="hs-identifier hs-var">mapping</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[NatCmmDecl statics instr]
</span><a href="#local-6989586621681043947"><span class="hs-identifier hs-var">tops'</span></a></span><span>
</span><span id="line-933"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">LabelMap (Maybe BlockId) -&gt; CFG -&gt; CFG
</span><a href="GHC.CmmToAsm.CFG.html#shortcutWeightMap"><span class="hs-identifier hs-var">shortcutWeightMap</span></a></span><span> </span><span class="annot"><span class="annottext">LabelMap (Maybe BlockId)
</span><a href="#local-6989586621681043945"><span class="hs-identifier hs-var">mappingBid</span></a></span><span> </span><span class="annot"><span class="annottext">(CFG -&gt; CFG) -&gt; Maybe CFG -&gt; Maybe CFG
forall (m :: * -&gt; *) a1 r. Monad m =&gt; (a1 -&gt; r) -&gt; m a1 -&gt; m r
</span><a href="../../base/src/Control.Monad.html#%3C%24%21%3E"><span class="hs-operator hs-var">&lt;$!&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe CFG
</span><a href="#local-6989586621681043951"><span class="hs-identifier hs-var">weights</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-934"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-935"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[NatCmmDecl statics instr]
</span><a href="#local-6989586621681043952"><span class="hs-identifier hs-var">tops</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe CFG
</span><a href="#local-6989586621681043951"><span class="hs-identifier hs-var">weights</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-936"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-937"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621681043947"><span class="annot"><span class="annottext">[NatCmmDecl statics instr]
</span><a href="#local-6989586621681043947"><span class="hs-identifier hs-var">tops'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681043944"><span class="annot"><span class="annottext">[LabelMap jumpDest]
</span><a href="#local-6989586621681043944"><span class="hs-identifier hs-var">mappings</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(NatCmmDecl statics instr
 -&gt; (NatCmmDecl statics instr, LabelMap jumpDest))
-&gt; [NatCmmDecl statics instr]
-&gt; ([NatCmmDecl statics instr], [LabelMap jumpDest])
forall a b c. (a -&gt; (b, c)) -&gt; [a] -&gt; ([b], [c])
</span><a href="GHC.Utils.Misc.html#mapAndUnzip"><span class="hs-identifier hs-var">mapAndUnzip</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
-&gt; NatCmmDecl statics instr
-&gt; (NatCmmDecl statics instr, LabelMap jumpDest)
forall instr t d statics jumpDest.
NcgImpl statics instr jumpDest
-&gt; GenCmmDecl d (LabelMap t) (ListGraph instr)
-&gt; (GenCmmDecl d (LabelMap t) (ListGraph instr), LabelMap jumpDest)
</span><a href="GHC.CmmToAsm.html#build_mapping"><span class="hs-identifier hs-var">build_mapping</span></a></span><span> </span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
</span><a href="#local-6989586621681043953"><span class="hs-identifier hs-var">ncgImpl</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[NatCmmDecl statics instr]
</span><a href="#local-6989586621681043952"><span class="hs-identifier hs-var">tops</span></a></span><span>
</span><span id="line-938"></span><span>    </span><span id="local-6989586621681043948"><span class="annot"><span class="annottext">mapping :: LabelMap jumpDest
</span><a href="#local-6989586621681043948"><span class="hs-identifier hs-var hs-var">mapping</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[LabelMap jumpDest] -&gt; LabelMap jumpDest
forall (map :: * -&gt; *) a. IsMap map =&gt; [map a] -&gt; map a
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapUnions"><span class="hs-identifier hs-var">mapUnions</span></a></span><span> </span><span class="annot"><span class="annottext">[LabelMap jumpDest]
</span><a href="#local-6989586621681043944"><span class="hs-identifier hs-var">mappings</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#LabelMap"><span class="hs-identifier hs-type">LabelMap</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044951"><span class="hs-identifier hs-type">jumpDest</span></a></span><span>
</span><span id="line-939"></span><span>    </span><span id="local-6989586621681043945"><span class="annot"><span class="annottext">mappingBid :: LabelMap (Maybe BlockId)
</span><a href="#local-6989586621681043945"><span class="hs-identifier hs-var hs-var">mappingBid</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(jumpDest -&gt; Maybe BlockId)
-&gt; LabelMap jumpDest -&gt; LabelMap (Maybe BlockId)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest -&gt; jumpDest -&gt; Maybe BlockId
forall statics instr jumpDest.
NcgImpl statics instr jumpDest -&gt; jumpDest -&gt; Maybe BlockId
</span><a href="GHC.CmmToAsm.Monad.html#getJumpDestBlockId"><span class="hs-identifier hs-var hs-var">getJumpDestBlockId</span></a></span><span> </span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
</span><a href="#local-6989586621681043953"><span class="hs-identifier hs-var">ncgImpl</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">LabelMap jumpDest
</span><a href="#local-6989586621681043948"><span class="hs-identifier hs-var">mapping</span></a></span><span>
</span><span id="line-940"></span><span>
</span><span id="line-941"></span><span class="annot"><a href="GHC.CmmToAsm.html#build_mapping"><span class="hs-identifier hs-type">build_mapping</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-keyword">forall</span><span> </span><span id="local-6989586621681044890"><span class="annot"><a href="#local-6989586621681044890"><span class="hs-identifier hs-type">instr</span></a></span></span><span> </span><span id="local-6989586621681044887"><span class="annot"><a href="#local-6989586621681044887"><span class="hs-identifier hs-type">t</span></a></span></span><span> </span><span id="local-6989586621681044888"><span class="annot"><a href="#local-6989586621681044888"><span class="hs-identifier hs-type">d</span></a></span></span><span> </span><span id="local-6989586621681044891"><span class="annot"><a href="#local-6989586621681044891"><span class="hs-identifier hs-type">statics</span></a></span></span><span> </span><span id="local-6989586621681044889"><span class="annot"><a href="#local-6989586621681044889"><span class="hs-identifier hs-type">jumpDest</span></a></span></span><span class="hs-operator">.</span><span>
</span><span id="line-942"></span><span>                 </span><span class="annot"><a href="GHC.CmmToAsm.Monad.html#NcgImpl"><span class="hs-identifier hs-type">NcgImpl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044891"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044890"><span class="hs-identifier hs-type">instr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044889"><span class="hs-identifier hs-type">jumpDest</span></a></span><span>
</span><span id="line-943"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.html#GenCmmDecl"><span class="hs-identifier hs-type">GenCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044888"><span class="hs-identifier hs-type">d</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#LabelMap"><span class="hs-identifier hs-type">LabelMap</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044887"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#ListGraph"><span class="hs-identifier hs-type">ListGraph</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044890"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-944"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#GenCmmDecl"><span class="hs-identifier hs-type">GenCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044888"><span class="hs-identifier hs-type">d</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#LabelMap"><span class="hs-identifier hs-type">LabelMap</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044887"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#ListGraph"><span class="hs-identifier hs-type">ListGraph</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044890"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-945"></span><span>                 </span><span class="hs-special">,</span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#LabelMap"><span class="hs-identifier hs-type">LabelMap</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044889"><span class="hs-identifier hs-type">jumpDest</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-946"></span><span id="build_mapping"><span class="annot"><span class="annottext">build_mapping :: forall instr t d statics jumpDest.
NcgImpl statics instr jumpDest
-&gt; GenCmmDecl d (LabelMap t) (ListGraph instr)
-&gt; (GenCmmDecl d (LabelMap t) (ListGraph instr), LabelMap jumpDest)
</span><a href="GHC.CmmToAsm.html#build_mapping"><span class="hs-identifier hs-var hs-var">build_mapping</span></a></span></span><span> </span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681043930"><span class="annot"><span class="annottext">top :: GenCmmDecl d (LabelMap t) (ListGraph instr)
</span><a href="#local-6989586621681043930"><span class="hs-identifier hs-var">top</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#CmmData"><span class="hs-identifier hs-type">CmmData</span></a></span><span> </span><span class="annot"><span class="annottext">Section
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">d
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GenCmmDecl d (LabelMap t) (ListGraph instr)
</span><a href="#local-6989586621681043930"><span class="hs-identifier hs-var">top</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">LabelMap jumpDest
forall (map :: * -&gt; *) a. IsMap map =&gt; map a
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapEmpty"><span class="hs-identifier hs-var">mapEmpty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-947"></span><span class="annot"><a href="GHC.CmmToAsm.html#build_mapping"><span class="hs-identifier hs-var">build_mapping</span></a></span><span> </span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#CmmProc"><span class="hs-identifier hs-type">CmmProc</span></a></span><span> </span><span id="local-6989586621681043929"><span class="annot"><span class="annottext">LabelMap t
</span><a href="#local-6989586621681043929"><span class="hs-identifier hs-var">info</span></a></span></span><span> </span><span id="local-6989586621681043928"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681043928"><span class="hs-identifier hs-var">lbl</span></a></span></span><span> </span><span id="local-6989586621681043927"><span class="annot"><span class="annottext">[GlobalReg]
</span><a href="#local-6989586621681043927"><span class="hs-identifier hs-var">live</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#ListGraph"><span class="hs-identifier hs-type">ListGraph</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-948"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LabelMap t
-&gt; CLabel
-&gt; [GlobalReg]
-&gt; ListGraph instr
-&gt; GenCmmDecl d (LabelMap t) (ListGraph instr)
forall d h g. h -&gt; CLabel -&gt; [GlobalReg] -&gt; g -&gt; GenCmmDecl d h g
</span><a href="GHC.Cmm.html#CmmProc"><span class="hs-identifier hs-var">CmmProc</span></a></span><span> </span><span class="annot"><span class="annottext">LabelMap t
</span><a href="#local-6989586621681043929"><span class="hs-identifier hs-var">info</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681043928"><span class="hs-identifier hs-var">lbl</span></a></span><span> </span><span class="annot"><span class="annottext">[GlobalReg]
</span><a href="#local-6989586621681043927"><span class="hs-identifier hs-var">live</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[GenBasicBlock instr] -&gt; ListGraph instr
forall i. [GenBasicBlock i] -&gt; ListGraph i
</span><a href="GHC.Cmm.html#ListGraph"><span class="hs-identifier hs-var">ListGraph</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">LabelMap jumpDest
forall (map :: * -&gt; *) a. IsMap map =&gt; map a
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapEmpty"><span class="hs-identifier hs-var">mapEmpty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-949"></span><span class="annot"><a href="GHC.CmmToAsm.html#build_mapping"><span class="hs-identifier hs-var">build_mapping</span></a></span><span> </span><span id="local-6989586621681043926"><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
</span><a href="#local-6989586621681043926"><span class="hs-identifier hs-var">ncgImpl</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#CmmProc"><span class="hs-identifier hs-type">CmmProc</span></a></span><span> </span><span id="local-6989586621681043925"><span class="annot"><span class="annottext">LabelMap t
</span><a href="#local-6989586621681043925"><span class="hs-identifier hs-var">info</span></a></span></span><span> </span><span id="local-6989586621681043924"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681043924"><span class="hs-identifier hs-var">lbl</span></a></span></span><span> </span><span id="local-6989586621681043923"><span class="annot"><span class="annottext">[GlobalReg]
</span><a href="#local-6989586621681043923"><span class="hs-identifier hs-var">live</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#ListGraph"><span class="hs-identifier hs-type">ListGraph</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681043922"><span class="annot"><span class="annottext">GenBasicBlock instr
</span><a href="#local-6989586621681043922"><span class="hs-identifier hs-var">head</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621681043921"><span class="annot"><span class="annottext">[GenBasicBlock instr]
</span><a href="#local-6989586621681043921"><span class="hs-identifier hs-var">blocks</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-950"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LabelMap t
-&gt; CLabel
-&gt; [GlobalReg]
-&gt; ListGraph instr
-&gt; GenCmmDecl d (LabelMap t) (ListGraph instr)
forall d h g. h -&gt; CLabel -&gt; [GlobalReg] -&gt; g -&gt; GenCmmDecl d h g
</span><a href="GHC.Cmm.html#CmmProc"><span class="hs-identifier hs-var">CmmProc</span></a></span><span> </span><span class="annot"><span class="annottext">LabelMap t
</span><a href="#local-6989586621681043925"><span class="hs-identifier hs-var">info</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681043924"><span class="hs-identifier hs-var">lbl</span></a></span><span> </span><span class="annot"><span class="annottext">[GlobalReg]
</span><a href="#local-6989586621681043923"><span class="hs-identifier hs-var">live</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[GenBasicBlock instr] -&gt; ListGraph instr
forall i. [GenBasicBlock i] -&gt; ListGraph i
</span><a href="GHC.Cmm.html#ListGraph"><span class="hs-identifier hs-var">ListGraph</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GenBasicBlock instr
</span><a href="#local-6989586621681043922"><span class="hs-identifier hs-var">head</span></a></span><span class="annot"><span class="annottext">GenBasicBlock instr
-&gt; [GenBasicBlock instr] -&gt; [GenBasicBlock instr]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">[GenBasicBlock instr]
</span><a href="#local-6989586621681043920"><span class="hs-identifier hs-var">others</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">LabelMap jumpDest
</span><a href="#local-6989586621681043919"><span class="hs-identifier hs-var">mapping</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-951"></span><span>        </span><span class="hs-comment">-- drop the shorted blocks, but don't ever drop the first one,</span><span>
</span><span id="line-952"></span><span>        </span><span class="hs-comment">-- because it is pointed to by a global label.</span><span>
</span><span id="line-953"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-954"></span><span>    </span><span class="hs-comment">-- find all the blocks that just consist of a jump that can be</span><span>
</span><span id="line-955"></span><span>    </span><span class="hs-comment">-- shorted.</span><span>
</span><span id="line-956"></span><span>    </span><span class="hs-comment">-- Don't completely eliminate loops here -- that can leave a dangling jump!</span><span>
</span><span id="line-957"></span><span>    </span><span class="annot"><a href="#local-6989586621681043918"><span class="hs-identifier hs-type">shortcut_blocks</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.BlockId.html#BlockId"><span class="hs-identifier hs-type">BlockId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621681044889"><span class="hs-identifier hs-type">jumpDest</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-958"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LabelSet
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681043918"><span class="annot"><span class="annottext">[(BlockId, jumpDest)]
</span><a href="#local-6989586621681043918"><span class="hs-identifier hs-var">shortcut_blocks</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681043920"><span class="annot"><span class="annottext">[GenBasicBlock instr]
</span><a href="#local-6989586621681043920"><span class="hs-identifier hs-var">others</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-959"></span><span>        </span><span class="annot"><span class="annottext">((LabelSet, [(BlockId, jumpDest)], [GenBasicBlock instr])
 -&gt; GenBasicBlock instr
 -&gt; (LabelSet, [(BlockId, jumpDest)], [GenBasicBlock instr]))
-&gt; (LabelSet, [(BlockId, jumpDest)], [GenBasicBlock instr])
-&gt; [GenBasicBlock instr]
-&gt; (LabelSet, [(BlockId, jumpDest)], [GenBasicBlock instr])
forall (t :: * -&gt; *) b a.
Foldable t =&gt;
(b -&gt; a -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldl%27"><span class="hs-identifier hs-var">foldl'</span></a></span><span> </span><span class="annot"><span class="annottext">(LabelSet, [(BlockId, jumpDest)], [GenBasicBlock instr])
-&gt; GenBasicBlock instr
-&gt; (LabelSet, [(BlockId, jumpDest)], [GenBasicBlock instr])
</span><a href="#local-6989586621681043917"><span class="hs-identifier hs-var">split</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LabelSet
forall set. IsSet set =&gt; set
</span><a href="GHC.Cmm.Dataflow.Collections.html#setEmpty"><span class="hs-identifier hs-var">setEmpty</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#LabelSet"><span class="hs-identifier hs-type">LabelSet</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[GenBasicBlock instr]
</span><a href="#local-6989586621681043921"><span class="hs-identifier hs-var">blocks</span></a></span><span>
</span><span id="line-960"></span><span>    </span><span id="local-6989586621681043917"><span class="annot"><span class="annottext">split :: (LabelSet, [(BlockId, jumpDest)], [GenBasicBlock instr])
-&gt; GenBasicBlock instr
-&gt; (LabelSet, [(BlockId, jumpDest)], [GenBasicBlock instr])
</span><a href="#local-6989586621681043917"><span class="hs-identifier hs-var hs-var">split</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681043916"><span class="annot"><span class="annottext">LabelSet
</span><a href="#local-6989586621681043916"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681043915"><span class="annot"><span class="annottext">[(BlockId, jumpDest)]
</span><a href="#local-6989586621681043915"><span class="hs-identifier hs-var">shortcut_blocks</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681043914"><span class="annot"><span class="annottext">[GenBasicBlock instr]
</span><a href="#local-6989586621681043914"><span class="hs-identifier hs-var">others</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681043913"><span class="annot"><span class="annottext">b :: GenBasicBlock instr
</span><a href="#local-6989586621681043913"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#BasicBlock"><span class="hs-identifier hs-type">BasicBlock</span></a></span><span> </span><span id="local-6989586621681043912"><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681043912"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-special">[</span><span id="local-6989586621681043911"><span class="annot"><span class="annottext">instr
</span><a href="#local-6989586621681043911"><span class="hs-identifier hs-var">insn</span></a></span></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-961"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681043910"><span class="annot"><span class="annottext">jumpDest
</span><a href="#local-6989586621681043910"><span class="hs-identifier hs-var">jd</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest -&gt; instr -&gt; Maybe jumpDest
forall statics instr jumpDest.
NcgImpl statics instr jumpDest -&gt; instr -&gt; Maybe jumpDest
</span><a href="GHC.CmmToAsm.Monad.html#canShortcut"><span class="hs-identifier hs-var hs-var">canShortcut</span></a></span><span> </span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
</span><a href="#local-6989586621681043926"><span class="hs-identifier hs-var">ncgImpl</span></a></span><span> </span><span class="annot"><span class="annottext">instr
</span><a href="#local-6989586621681043911"><span class="hs-identifier hs-var">insn</span></a></span><span>
</span><span id="line-962"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681043909"><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681043909"><span class="hs-identifier hs-var">dest</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest -&gt; jumpDest -&gt; Maybe BlockId
forall statics instr jumpDest.
NcgImpl statics instr jumpDest -&gt; jumpDest -&gt; Maybe BlockId
</span><a href="GHC.CmmToAsm.Monad.html#getJumpDestBlockId"><span class="hs-identifier hs-var hs-var">getJumpDestBlockId</span></a></span><span> </span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
</span><a href="#local-6989586621681043926"><span class="hs-identifier hs-var">ncgImpl</span></a></span><span> </span><span class="annot"><span class="annottext">jumpDest
</span><a href="#local-6989586621681043910"><span class="hs-identifier hs-var">jd</span></a></span><span>
</span><span id="line-963"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BlockId -&gt; Bool
</span><a href="#local-6989586621681043908"><span class="hs-identifier hs-var">has_info</span></a></span><span> </span><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681043912"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-964"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ElemOf LabelSet -&gt; LabelSet -&gt; Bool
forall set. IsSet set =&gt; ElemOf set -&gt; set -&gt; Bool
</span><a href="GHC.Cmm.Dataflow.Collections.html#setMember"><span class="hs-identifier hs-var">setMember</span></a></span><span> </span><span class="annot"><span class="annottext">ElemOf LabelSet
BlockId
</span><a href="#local-6989586621681043909"><span class="hs-identifier hs-var">dest</span></a></span><span> </span><span class="annot"><span class="annottext">LabelSet
</span><a href="#local-6989586621681043916"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681043909"><span class="hs-identifier hs-var">dest</span></a></span><span> </span><span class="annot"><span class="annottext">BlockId -&gt; BlockId -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681043912"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="hs-comment">-- loop checks</span><span>
</span><span id="line-965"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LabelSet
</span><a href="#local-6989586621681043916"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[(BlockId, jumpDest)]
</span><a href="#local-6989586621681043915"><span class="hs-identifier hs-var">shortcut_blocks</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">GenBasicBlock instr
</span><a href="#local-6989586621681043913"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">GenBasicBlock instr
-&gt; [GenBasicBlock instr] -&gt; [GenBasicBlock instr]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[GenBasicBlock instr]
</span><a href="#local-6989586621681043914"><span class="hs-identifier hs-var">others</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-966"></span><span>    </span><span class="annot"><a href="#local-6989586621681043917"><span class="hs-identifier hs-var">split</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681043906"><span class="annot"><span class="annottext">LabelSet
</span><a href="#local-6989586621681043906"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681043905"><span class="annot"><span class="annottext">[(BlockId, jumpDest)]
</span><a href="#local-6989586621681043905"><span class="hs-identifier hs-var">shortcut_blocks</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681043904"><span class="annot"><span class="annottext">[GenBasicBlock instr]
</span><a href="#local-6989586621681043904"><span class="hs-identifier hs-var">others</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#BasicBlock"><span class="hs-identifier hs-type">BasicBlock</span></a></span><span> </span><span id="local-6989586621681043903"><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681043903"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-special">[</span><span id="local-6989586621681043902"><span class="annot"><span class="annottext">instr
</span><a href="#local-6989586621681043902"><span class="hs-identifier hs-var">insn</span></a></span></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-967"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681043901"><span class="annot"><span class="annottext">jumpDest
</span><a href="#local-6989586621681043901"><span class="hs-identifier hs-var">dest</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest -&gt; instr -&gt; Maybe jumpDest
forall statics instr jumpDest.
NcgImpl statics instr jumpDest -&gt; instr -&gt; Maybe jumpDest
</span><a href="GHC.CmmToAsm.Monad.html#canShortcut"><span class="hs-identifier hs-var hs-var">canShortcut</span></a></span><span> </span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
</span><a href="#local-6989586621681043926"><span class="hs-identifier hs-var">ncgImpl</span></a></span><span> </span><span class="annot"><span class="annottext">instr
</span><a href="#local-6989586621681043902"><span class="hs-identifier hs-var">insn</span></a></span><span>
</span><span id="line-968"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BlockId -&gt; Bool
</span><a href="#local-6989586621681043908"><span class="hs-identifier hs-var">has_info</span></a></span><span> </span><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681043903"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-969"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ElemOf LabelSet -&gt; LabelSet -&gt; LabelSet
forall set. IsSet set =&gt; ElemOf set -&gt; set -&gt; set
</span><a href="GHC.Cmm.Dataflow.Collections.html#setInsert"><span class="hs-identifier hs-var">setInsert</span></a></span><span> </span><span class="annot"><span class="annottext">ElemOf LabelSet
BlockId
</span><a href="#local-6989586621681043903"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">LabelSet
</span><a href="#local-6989586621681043906"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681043903"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">jumpDest
</span><a href="#local-6989586621681043901"><span class="hs-identifier hs-var">dest</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(BlockId, jumpDest)
-&gt; [(BlockId, jumpDest)] -&gt; [(BlockId, jumpDest)]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[(BlockId, jumpDest)]
</span><a href="#local-6989586621681043905"><span class="hs-identifier hs-var">shortcut_blocks</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[GenBasicBlock instr]
</span><a href="#local-6989586621681043904"><span class="hs-identifier hs-var">others</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-970"></span><span>    </span><span class="annot"><a href="#local-6989586621681043917"><span class="hs-identifier hs-var">split</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681043899"><span class="annot"><span class="annottext">LabelSet
</span><a href="#local-6989586621681043899"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681043898"><span class="annot"><span class="annottext">[(BlockId, jumpDest)]
</span><a href="#local-6989586621681043898"><span class="hs-identifier hs-var">shortcut_blocks</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681043897"><span class="annot"><span class="annottext">[GenBasicBlock instr]
</span><a href="#local-6989586621681043897"><span class="hs-identifier hs-var">others</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681043896"><span class="annot"><span class="annottext">GenBasicBlock instr
</span><a href="#local-6989586621681043896"><span class="hs-identifier hs-var">other</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LabelSet
</span><a href="#local-6989586621681043899"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[(BlockId, jumpDest)]
</span><a href="#local-6989586621681043898"><span class="hs-identifier hs-var">shortcut_blocks</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">GenBasicBlock instr
</span><a href="#local-6989586621681043896"><span class="hs-identifier hs-var">other</span></a></span><span> </span><span class="annot"><span class="annottext">GenBasicBlock instr
-&gt; [GenBasicBlock instr] -&gt; [GenBasicBlock instr]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[GenBasicBlock instr]
</span><a href="#local-6989586621681043897"><span class="hs-identifier hs-var">others</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-971"></span><span>
</span><span id="line-972"></span><span>    </span><span class="hs-comment">-- do not eliminate blocks that have an info table</span><span>
</span><span id="line-973"></span><span>    </span><span id="local-6989586621681043908"><span class="annot"><span class="annottext">has_info :: BlockId -&gt; Bool
</span><a href="#local-6989586621681043908"><span class="hs-identifier hs-var hs-var">has_info</span></a></span></span><span> </span><span id="local-6989586621681043895"><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681043895"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">KeyOf LabelMap -&gt; LabelMap t -&gt; Bool
forall (map :: * -&gt; *) a. IsMap map =&gt; KeyOf map -&gt; map a -&gt; Bool
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapMember"><span class="hs-identifier hs-var">mapMember</span></a></span><span> </span><span class="annot"><span class="annottext">KeyOf LabelMap
BlockId
</span><a href="#local-6989586621681043895"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">LabelMap t
</span><a href="#local-6989586621681043925"><span class="hs-identifier hs-var">info</span></a></span><span>
</span><span id="line-974"></span><span>
</span><span id="line-975"></span><span>    </span><span class="hs-comment">-- build a mapping from BlockId to JumpDest for shorting branches</span><span>
</span><span id="line-976"></span><span>    </span><span id="local-6989586621681043919"><span class="annot"><span class="annottext">mapping :: LabelMap jumpDest
</span><a href="#local-6989586621681043919"><span class="hs-identifier hs-var hs-var">mapping</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(KeyOf LabelMap, jumpDest)] -&gt; LabelMap jumpDest
forall (map :: * -&gt; *) a. IsMap map =&gt; [(KeyOf map, a)] -&gt; map a
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapFromList"><span class="hs-identifier hs-var">mapFromList</span></a></span><span> </span><span class="annot"><span class="annottext">[(KeyOf LabelMap, jumpDest)]
[(BlockId, jumpDest)]
</span><a href="#local-6989586621681043918"><span class="hs-identifier hs-var">shortcut_blocks</span></a></span><span>
</span><span id="line-977"></span><span>
</span><span id="line-978"></span><span id="local-6989586621681044895"><span id="local-6989586621681044896"><span id="local-6989586621681044897"><span id="local-6989586621681044898"><span class="annot"><a href="GHC.CmmToAsm.html#apply_mapping"><span class="hs-identifier hs-type">apply_mapping</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Monad.html#NcgImpl"><span class="hs-identifier hs-type">NcgImpl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044898"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044897"><span class="hs-identifier hs-type">instr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044896"><span class="hs-identifier hs-type">jumpDest</span></a></span><span>
</span><span id="line-979"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#LabelMap"><span class="hs-identifier hs-type">LabelMap</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044896"><span class="hs-identifier hs-type">jumpDest</span></a></span><span>
</span><span id="line-980"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.html#GenCmmDecl"><span class="hs-identifier hs-type">GenCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044898"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044895"><span class="hs-identifier hs-type">h</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#ListGraph"><span class="hs-identifier hs-type">ListGraph</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044897"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-981"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.html#GenCmmDecl"><span class="hs-identifier hs-type">GenCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044898"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044895"><span class="hs-identifier hs-type">h</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#ListGraph"><span class="hs-identifier hs-type">ListGraph</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044897"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">)</span></span></span></span></span><span>
</span><span id="line-982"></span><span id="apply_mapping"><span class="annot"><span class="annottext">apply_mapping :: forall statics instr jumpDest h.
NcgImpl statics instr jumpDest
-&gt; LabelMap jumpDest
-&gt; GenCmmDecl statics h (ListGraph instr)
-&gt; GenCmmDecl statics h (ListGraph instr)
</span><a href="GHC.CmmToAsm.html#apply_mapping"><span class="hs-identifier hs-var hs-var">apply_mapping</span></a></span></span><span> </span><span id="local-6989586621681043891"><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
</span><a href="#local-6989586621681043891"><span class="hs-identifier hs-var">ncgImpl</span></a></span></span><span> </span><span id="local-6989586621681043890"><span class="annot"><span class="annottext">LabelMap jumpDest
</span><a href="#local-6989586621681043890"><span class="hs-identifier hs-var">ufm</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#CmmData"><span class="hs-identifier hs-type">CmmData</span></a></span><span> </span><span id="local-6989586621681043889"><span class="annot"><span class="annottext">Section
</span><a href="#local-6989586621681043889"><span class="hs-identifier hs-var">sec</span></a></span></span><span> </span><span id="local-6989586621681043888"><span class="annot"><span class="annottext">statics
</span><a href="#local-6989586621681043888"><span class="hs-identifier hs-var">statics</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-983"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Section -&gt; statics -&gt; GenCmmDecl statics h (ListGraph instr)
forall d h g. Section -&gt; d -&gt; GenCmmDecl d h g
</span><a href="GHC.Cmm.html#CmmData"><span class="hs-identifier hs-var">CmmData</span></a></span><span> </span><span class="annot"><span class="annottext">Section
</span><a href="#local-6989586621681043889"><span class="hs-identifier hs-var">sec</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
-&gt; (BlockId -&gt; Maybe jumpDest) -&gt; statics -&gt; statics
forall statics instr jumpDest.
NcgImpl statics instr jumpDest
-&gt; (BlockId -&gt; Maybe jumpDest) -&gt; statics -&gt; statics
</span><a href="GHC.CmmToAsm.Monad.html#shortcutStatics"><span class="hs-identifier hs-var hs-var">shortcutStatics</span></a></span><span> </span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
</span><a href="#local-6989586621681043891"><span class="hs-identifier hs-var">ncgImpl</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621681043887"><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681043887"><span class="hs-identifier hs-var">bid</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">KeyOf LabelMap -&gt; LabelMap jumpDest -&gt; Maybe jumpDest
forall (map :: * -&gt; *) a.
IsMap map =&gt;
KeyOf map -&gt; map a -&gt; Maybe a
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapLookup"><span class="hs-identifier hs-var">mapLookup</span></a></span><span> </span><span class="annot"><span class="annottext">KeyOf LabelMap
BlockId
</span><a href="#local-6989586621681043887"><span class="hs-identifier hs-var">bid</span></a></span><span> </span><span class="annot"><span class="annottext">LabelMap jumpDest
</span><a href="#local-6989586621681043890"><span class="hs-identifier hs-var">ufm</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">statics
</span><a href="#local-6989586621681043888"><span class="hs-identifier hs-var">statics</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-984"></span><span class="annot"><a href="GHC.CmmToAsm.html#apply_mapping"><span class="hs-identifier hs-var">apply_mapping</span></a></span><span> </span><span id="local-6989586621681043885"><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
</span><a href="#local-6989586621681043885"><span class="hs-identifier hs-var">ncgImpl</span></a></span></span><span> </span><span id="local-6989586621681043884"><span class="annot"><span class="annottext">LabelMap jumpDest
</span><a href="#local-6989586621681043884"><span class="hs-identifier hs-var">ufm</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#CmmProc"><span class="hs-identifier hs-type">CmmProc</span></a></span><span> </span><span id="local-6989586621681043883"><span class="annot"><span class="annottext">h
</span><a href="#local-6989586621681043883"><span class="hs-identifier hs-var">info</span></a></span></span><span> </span><span id="local-6989586621681043882"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681043882"><span class="hs-identifier hs-var">lbl</span></a></span></span><span> </span><span id="local-6989586621681043881"><span class="annot"><span class="annottext">[GlobalReg]
</span><a href="#local-6989586621681043881"><span class="hs-identifier hs-var">live</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#ListGraph"><span class="hs-identifier hs-type">ListGraph</span></a></span><span> </span><span id="local-6989586621681043880"><span class="annot"><span class="annottext">[GenBasicBlock instr]
</span><a href="#local-6989586621681043880"><span class="hs-identifier hs-var">blocks</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-985"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">h
-&gt; CLabel
-&gt; [GlobalReg]
-&gt; ListGraph instr
-&gt; GenCmmDecl statics h (ListGraph instr)
forall d h g. h -&gt; CLabel -&gt; [GlobalReg] -&gt; g -&gt; GenCmmDecl d h g
</span><a href="GHC.Cmm.html#CmmProc"><span class="hs-identifier hs-var">CmmProc</span></a></span><span> </span><span class="annot"><span class="annottext">h
</span><a href="#local-6989586621681043883"><span class="hs-identifier hs-var">info</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681043882"><span class="hs-identifier hs-var">lbl</span></a></span><span> </span><span class="annot"><span class="annottext">[GlobalReg]
</span><a href="#local-6989586621681043881"><span class="hs-identifier hs-var">live</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[GenBasicBlock instr] -&gt; ListGraph instr
forall i. [GenBasicBlock i] -&gt; ListGraph i
</span><a href="GHC.Cmm.html#ListGraph"><span class="hs-identifier hs-var">ListGraph</span></a></span><span> </span><span class="annot"><span class="annottext">([GenBasicBlock instr] -&gt; ListGraph instr)
-&gt; [GenBasicBlock instr] -&gt; ListGraph instr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(GenBasicBlock instr -&gt; GenBasicBlock instr)
-&gt; [GenBasicBlock instr] -&gt; [GenBasicBlock instr]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">GenBasicBlock instr -&gt; GenBasicBlock instr
</span><a href="#local-6989586621681043879"><span class="hs-identifier hs-var">short_bb</span></a></span><span> </span><span class="annot"><span class="annottext">[GenBasicBlock instr]
</span><a href="#local-6989586621681043880"><span class="hs-identifier hs-var">blocks</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-986"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-987"></span><span>    </span><span id="local-6989586621681043879"><span class="annot"><span class="annottext">short_bb :: GenBasicBlock instr -&gt; GenBasicBlock instr
</span><a href="#local-6989586621681043879"><span class="hs-identifier hs-var hs-var">short_bb</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#BasicBlock"><span class="hs-identifier hs-type">BasicBlock</span></a></span><span> </span><span id="local-6989586621681043878"><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681043878"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span id="local-6989586621681043877"><span class="annot"><span class="annottext">[instr]
</span><a href="#local-6989586621681043877"><span class="hs-identifier hs-var">insns</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BlockId -&gt; [instr] -&gt; GenBasicBlock instr
forall i. BlockId -&gt; [i] -&gt; GenBasicBlock i
</span><a href="GHC.Cmm.html#BasicBlock"><span class="hs-identifier hs-var">BasicBlock</span></a></span><span> </span><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681043878"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">([instr] -&gt; GenBasicBlock instr) -&gt; [instr] -&gt; GenBasicBlock instr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24%21"><span class="hs-operator hs-var">$!</span></a></span><span> </span><span class="annot"><span class="annottext">(instr -&gt; instr) -&gt; [instr] -&gt; [instr]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">instr -&gt; instr
</span><a href="#local-6989586621681043876"><span class="hs-identifier hs-var">short_insn</span></a></span><span> </span><span class="annot"><span class="annottext">[instr]
</span><a href="#local-6989586621681043877"><span class="hs-identifier hs-var">insns</span></a></span><span>
</span><span id="line-988"></span><span>    </span><span id="local-6989586621681043876"><span class="annot"><span class="annottext">short_insn :: instr -&gt; instr
</span><a href="#local-6989586621681043876"><span class="hs-identifier hs-var hs-var">short_insn</span></a></span></span><span> </span><span id="local-6989586621681043875"><span class="annot"><span class="annottext">instr
</span><a href="#local-6989586621681043875"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
-&gt; (BlockId -&gt; Maybe jumpDest) -&gt; instr -&gt; instr
forall statics instr jumpDest.
NcgImpl statics instr jumpDest
-&gt; (BlockId -&gt; Maybe jumpDest) -&gt; instr -&gt; instr
</span><a href="GHC.CmmToAsm.Monad.html#shortcutJump"><span class="hs-identifier hs-var hs-var">shortcutJump</span></a></span><span> </span><span class="annot"><span class="annottext">NcgImpl statics instr jumpDest
</span><a href="#local-6989586621681043885"><span class="hs-identifier hs-var">ncgImpl</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621681043874"><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681043874"><span class="hs-identifier hs-var">bid</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">KeyOf LabelMap -&gt; LabelMap jumpDest -&gt; Maybe jumpDest
forall (map :: * -&gt; *) a.
IsMap map =&gt;
KeyOf map -&gt; map a -&gt; Maybe a
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapLookup"><span class="hs-identifier hs-var">mapLookup</span></a></span><span> </span><span class="annot"><span class="annottext">KeyOf LabelMap
BlockId
</span><a href="#local-6989586621681043874"><span class="hs-identifier hs-var">bid</span></a></span><span> </span><span class="annot"><span class="annottext">LabelMap jumpDest
</span><a href="#local-6989586621681043884"><span class="hs-identifier hs-var">ufm</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">instr
</span><a href="#local-6989586621681043875"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-989"></span><span>                 </span><span class="hs-comment">-- shortcutJump should apply the mapping repeatedly,</span><span>
</span><span id="line-990"></span><span>                 </span><span class="hs-comment">-- just in case we can short multiple branches.</span><span>
</span><span id="line-991"></span><span>
</span><span id="line-992"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-993"></span><span class="hs-comment">-- Instruction selection</span><span>
</span><span id="line-994"></span><span>
</span><span id="line-995"></span><span class="hs-comment">-- Native code instruction selection for a chunk of stix code.  For</span><span>
</span><span id="line-996"></span><span class="hs-comment">-- this part of the computation, we switch from the UniqSM monad to</span><span>
</span><span id="line-997"></span><span class="hs-comment">-- the NatM monad.  The latter carries not only a Unique, but also an</span><span>
</span><span id="line-998"></span><span class="hs-comment">-- Int denoting the current C stack pointer offset in the generated</span><span>
</span><span id="line-999"></span><span class="hs-comment">-- code; this is needed for creating correct spill offsets on</span><span>
</span><span id="line-1000"></span><span class="hs-comment">-- architectures which don't offer, or for which it would be</span><span>
</span><span id="line-1001"></span><span class="hs-comment">-- prohibitively expensive to employ, a frame pointer register.  Viz,</span><span>
</span><span id="line-1002"></span><span class="hs-comment">-- x86.</span><span>
</span><span id="line-1003"></span><span>
</span><span id="line-1004"></span><span class="hs-comment">-- The offset is measured in bytes, and indicates the difference</span><span>
</span><span id="line-1005"></span><span class="hs-comment">-- between the current (simulated) C stack-ptr and the value it was at</span><span>
</span><span id="line-1006"></span><span class="hs-comment">-- the beginning of the block.  For stacks which grow down, this value</span><span>
</span><span id="line-1007"></span><span class="hs-comment">-- should be either zero or negative.</span><span>
</span><span id="line-1008"></span><span>
</span><span id="line-1009"></span><span class="hs-comment">-- Along with the stack pointer offset, we also carry along a LabelMap of</span><span>
</span><span id="line-1010"></span><span class="hs-comment">-- DebugBlocks, which we read to generate .location directives.</span><span>
</span><span id="line-1011"></span><span class="hs-comment">--</span><span>
</span><span id="line-1012"></span><span class="hs-comment">-- Switching between the two monads whilst carrying along the same</span><span>
</span><span id="line-1013"></span><span class="hs-comment">-- Unique supply breaks abstraction.  Is that bad?</span><span>
</span><span id="line-1014"></span><span>
</span><span id="line-1015"></span><span id="local-6989586621681044997"><span id="local-6989586621681044998"><span class="annot"><a href="GHC.CmmToAsm.html#genMachCode"><span class="hs-identifier hs-type">genMachCode</span></a></span><span>
</span><span id="line-1016"></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span>
</span><span id="line-1017"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Module.Location.html#ModLocation"><span class="hs-identifier hs-type">ModLocation</span></a></span><span>
</span><span id="line-1018"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#RawCmmDecl"><span class="hs-identifier hs-type">RawCmmDecl</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Monad.html#NatM"><span class="hs-identifier hs-type">NatM</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#NatCmmDecl"><span class="hs-identifier hs-type">NatCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044998"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044997"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-1019"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Monad.html#DwarfFiles"><span class="hs-identifier hs-type">DwarfFiles</span></a></span><span>
</span><span id="line-1020"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#LabelMap"><span class="hs-identifier hs-type">LabelMap</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#DebugBlock"><span class="hs-identifier hs-type">DebugBlock</span></a></span><span>
</span><span id="line-1021"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.html#RawCmmDecl"><span class="hs-identifier hs-type">RawCmmDecl</span></a></span><span>
</span><span id="line-1022"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.CFG.html#CFG"><span class="hs-identifier hs-type">CFG</span></a></span><span>
</span><span id="line-1023"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Supply.html#UniqSM"><span class="hs-identifier hs-type">UniqSM</span></a></span><span>
</span><span id="line-1024"></span><span>                </span><span class="hs-special">(</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#NatCmmDecl"><span class="hs-identifier hs-type">NatCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044998"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044997"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1025"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.CLabel.html#CLabel"><span class="hs-identifier hs-type">CLabel</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1026"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Monad.html#DwarfFiles"><span class="hs-identifier hs-type">DwarfFiles</span></a></span><span>
</span><span id="line-1027"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.CFG.html#CFG"><span class="hs-identifier hs-type">CFG</span></a></span><span>
</span><span id="line-1028"></span><span>                </span><span class="hs-special">)</span></span></span><span>
</span><span id="line-1029"></span><span>
</span><span id="line-1030"></span><span id="genMachCode"><span class="annot"><span class="annottext">genMachCode :: forall statics instr.
DynFlags
-&gt; Module
-&gt; ModLocation
-&gt; (RawCmmDecl -&gt; NatM [NatCmmDecl statics instr])
-&gt; DwarfFiles
-&gt; LabelMap DebugBlock
-&gt; RawCmmDecl
-&gt; CFG
-&gt; UniqSM ([NatCmmDecl statics instr], [CLabel], DwarfFiles, CFG)
</span><a href="GHC.CmmToAsm.html#genMachCode"><span class="hs-identifier hs-var hs-var">genMachCode</span></a></span></span><span> </span><span id="local-6989586621681043865"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681043865"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681043864"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681043864"><span class="hs-identifier hs-var">this_mod</span></a></span></span><span> </span><span id="local-6989586621681043863"><span class="annot"><span class="annottext">ModLocation
</span><a href="#local-6989586621681043863"><span class="hs-identifier hs-var">modLoc</span></a></span></span><span> </span><span id="local-6989586621681043862"><span class="annot"><span class="annottext">RawCmmDecl -&gt; NatM [NatCmmDecl statics instr]
</span><a href="#local-6989586621681043862"><span class="hs-identifier hs-var">cmmTopCodeGen</span></a></span></span><span> </span><span id="local-6989586621681043861"><span class="annot"><span class="annottext">DwarfFiles
</span><a href="#local-6989586621681043861"><span class="hs-identifier hs-var">fileIds</span></a></span></span><span> </span><span id="local-6989586621681043860"><span class="annot"><span class="annottext">LabelMap DebugBlock
</span><a href="#local-6989586621681043860"><span class="hs-identifier hs-var">dbgMap</span></a></span></span><span> </span><span id="local-6989586621681043859"><span class="annot"><span class="annottext">RawCmmDecl
</span><a href="#local-6989586621681043859"><span class="hs-identifier hs-var">cmm_top</span></a></span></span><span> </span><span id="local-6989586621681043858"><span class="annot"><span class="annottext">CFG
</span><a href="#local-6989586621681043858"><span class="hs-identifier hs-var">cmm_cfg</span></a></span></span><span>
</span><span id="line-1031"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>  </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681043857"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681043857"><span class="hs-identifier hs-var">initial_us</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">UniqSM UniqSupply
forall (m :: * -&gt; *). MonadUnique m =&gt; m UniqSupply
</span><a href="GHC.Types.Unique.Supply.html#getUniqueSupplyM"><span class="hs-identifier hs-var">getUniqueSupplyM</span></a></span><span>
</span><span id="line-1032"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681043855"><span class="annot"><span class="annottext">initial_st :: NatM_State
</span><a href="#local-6989586621681043855"><span class="hs-identifier hs-var hs-var">initial_st</span></a></span></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqSupply
-&gt; Int
-&gt; DynFlags
-&gt; Module
-&gt; ModLocation
-&gt; DwarfFiles
-&gt; LabelMap DebugBlock
-&gt; CFG
-&gt; NatM_State
</span><a href="GHC.CmmToAsm.Monad.html#mkNatM_State"><span class="hs-identifier hs-var">mkNatM_State</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681043857"><span class="hs-identifier hs-var">initial_us</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681043865"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681043864"><span class="hs-identifier hs-var">this_mod</span></a></span><span>
</span><span id="line-1033"></span><span>                                                  </span><span class="annot"><span class="annottext">ModLocation
</span><a href="#local-6989586621681043863"><span class="hs-identifier hs-var">modLoc</span></a></span><span> </span><span class="annot"><span class="annottext">DwarfFiles
</span><a href="#local-6989586621681043861"><span class="hs-identifier hs-var">fileIds</span></a></span><span> </span><span class="annot"><span class="annottext">LabelMap DebugBlock
</span><a href="#local-6989586621681043860"><span class="hs-identifier hs-var">dbgMap</span></a></span><span> </span><span class="annot"><span class="annottext">CFG
</span><a href="#local-6989586621681043858"><span class="hs-identifier hs-var">cmm_cfg</span></a></span><span>
</span><span id="line-1034"></span><span>              </span><span class="hs-special">(</span><span id="local-6989586621681043853"><span class="annot"><span class="annottext">[NatCmmDecl statics instr]
</span><a href="#local-6989586621681043853"><span class="hs-identifier hs-var">new_tops</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681043852"><span class="annot"><span class="annottext">NatM_State
</span><a href="#local-6989586621681043852"><span class="hs-identifier hs-var">final_st</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NatM_State
-&gt; NatM [NatCmmDecl statics instr]
-&gt; ([NatCmmDecl statics instr], NatM_State)
forall a. NatM_State -&gt; NatM a -&gt; (a, NatM_State)
</span><a href="GHC.CmmToAsm.Monad.html#initNat"><span class="hs-identifier hs-var">initNat</span></a></span><span> </span><span class="annot"><span class="annottext">NatM_State
</span><a href="#local-6989586621681043855"><span class="hs-identifier hs-var">initial_st</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RawCmmDecl -&gt; NatM [NatCmmDecl statics instr]
</span><a href="#local-6989586621681043862"><span class="hs-identifier hs-var">cmmTopCodeGen</span></a></span><span> </span><span class="annot"><span class="annottext">RawCmmDecl
</span><a href="#local-6989586621681043859"><span class="hs-identifier hs-var">cmm_top</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1035"></span><span>              </span><span id="local-6989586621681043850"><span class="annot"><span class="annottext">final_delta :: Int
</span><a href="#local-6989586621681043850"><span class="hs-identifier hs-var hs-var">final_delta</span></a></span></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NatM_State -&gt; Int
</span><a href="GHC.CmmToAsm.Monad.html#natm_delta"><span class="hs-identifier hs-var hs-var">natm_delta</span></a></span><span> </span><span class="annot"><span class="annottext">NatM_State
</span><a href="#local-6989586621681043852"><span class="hs-identifier hs-var">final_st</span></a></span><span>
</span><span id="line-1036"></span><span>              </span><span id="local-6989586621681043848"><span class="annot"><span class="annottext">final_imports :: [CLabel]
</span><a href="#local-6989586621681043848"><span class="hs-identifier hs-var hs-var">final_imports</span></a></span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NatM_State -&gt; [CLabel]
</span><a href="GHC.CmmToAsm.Monad.html#natm_imports"><span class="hs-identifier hs-var hs-var">natm_imports</span></a></span><span> </span><span class="annot"><span class="annottext">NatM_State
</span><a href="#local-6989586621681043852"><span class="hs-identifier hs-var">final_st</span></a></span><span>
</span><span id="line-1037"></span><span>              </span><span id="local-6989586621681043846"><span class="annot"><span class="annottext">final_cfg :: CFG
</span><a href="#local-6989586621681043846"><span class="hs-identifier hs-var hs-var">final_cfg</span></a></span></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NatM_State -&gt; CFG
</span><a href="GHC.CmmToAsm.Monad.html#natm_cfg"><span class="hs-identifier hs-var hs-var">natm_cfg</span></a></span><span> </span><span class="annot"><span class="annottext">NatM_State
</span><a href="#local-6989586621681043852"><span class="hs-identifier hs-var">final_st</span></a></span><span>
</span><span id="line-1038"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">if</span><span>   </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681043850"><span class="hs-identifier hs-var">final_delta</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-1039"></span><span>          </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">([NatCmmDecl statics instr], [CLabel], DwarfFiles, CFG)
-&gt; UniqSM ([NatCmmDecl statics instr], [CLabel], DwarfFiles, CFG)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[NatCmmDecl statics instr]
</span><a href="#local-6989586621681043853"><span class="hs-identifier hs-var">new_tops</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[CLabel]
</span><a href="#local-6989586621681043848"><span class="hs-identifier hs-var">final_imports</span></a></span><span>
</span><span id="line-1040"></span><span>                      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">NatM_State -&gt; DwarfFiles
</span><a href="GHC.CmmToAsm.Monad.html#natm_fileid"><span class="hs-identifier hs-var hs-var">natm_fileid</span></a></span><span> </span><span class="annot"><span class="annottext">NatM_State
</span><a href="#local-6989586621681043852"><span class="hs-identifier hs-var">final_st</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">CFG
</span><a href="#local-6989586621681043846"><span class="hs-identifier hs-var">final_cfg</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1041"></span><span>          </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">String
-&gt; SDoc
-&gt; UniqSM ([NatCmmDecl statics instr], [CLabel], DwarfFiles, CFG)
forall a. HasCallStack =&gt; String -&gt; SDoc -&gt; a
</span><a href="GHC.Utils.Outputable.html#pprPanic"><span class="hs-identifier hs-var">pprPanic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;genMachCode: nonzero final delta&quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#int"><span class="hs-identifier hs-var">int</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681043850"><span class="hs-identifier hs-var">final_delta</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1042"></span><span>    </span><span class="hs-special">}</span><span>
</span><span id="line-1043"></span><span>
</span><span id="line-1044"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-1045"></span><span class="hs-comment">-- Generic Cmm optimiser</span><span>
</span><span id="line-1046"></span><span>
</span><span id="line-1047"></span><span class="hs-comment">{-
Here we do:

  (a) Constant folding
  (c) Position independent code and dynamic linking
        (i)  introduce the appropriate indirections
             and position independent refs
        (ii) compile a list of imported symbols
  (d) Some arch-specific optimizations

(a) will be moving to the new Hoopl pipeline, however, (c) and
(d) are only needed by the native backend and will continue to live
here.

Ideas for other things we could do (put these in Hoopl please!):

  - shortcut jumps-to-jumps
  - simple CSE: if an expr is assigned to a temp, then replace later occs of
    that expr with the temp, until the expr is no longer valid (can push through
    temp assignments, and certain assigns to mem...)
-}</span><span>
</span><span id="line-1068"></span><span>
</span><span id="line-1069"></span><span class="annot"><a href="GHC.CmmToAsm.html#cmmToCmm"><span class="hs-identifier hs-type">cmmToCmm</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Config.html#NCGConfig"><span class="hs-identifier hs-type">NCGConfig</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.html#RawCmmDecl"><span class="hs-identifier hs-type">RawCmmDecl</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#RawCmmDecl"><span class="hs-identifier hs-type">RawCmmDecl</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.CLabel.html#CLabel"><span class="hs-identifier hs-type">CLabel</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-1070"></span><span id="cmmToCmm"><span class="annot"><span class="annottext">cmmToCmm :: NCGConfig -&gt; Module -&gt; RawCmmDecl -&gt; (RawCmmDecl, [CLabel])
</span><a href="GHC.CmmToAsm.html#cmmToCmm"><span class="hs-identifier hs-var hs-var">cmmToCmm</span></a></span></span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Module
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681043842"><span class="annot"><span class="annottext">top :: RawCmmDecl
</span><a href="#local-6989586621681043842"><span class="hs-identifier hs-var">top</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#CmmData"><span class="hs-identifier hs-type">CmmData</span></a></span><span> </span><span class="annot"><span class="annottext">Section
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">RawCmmStatics
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RawCmmDecl
</span><a href="#local-6989586621681043842"><span class="hs-identifier hs-var">top</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-1071"></span><span class="annot"><a href="GHC.CmmToAsm.html#cmmToCmm"><span class="hs-identifier hs-var">cmmToCmm</span></a></span><span> </span><span id="local-6989586621681043841"><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681043841"><span class="hs-identifier hs-var">config</span></a></span></span><span> </span><span id="local-6989586621681043840"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681043840"><span class="hs-identifier hs-var">this_mod</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#CmmProc"><span class="hs-identifier hs-type">CmmProc</span></a></span><span> </span><span id="local-6989586621681043839"><span class="annot"><span class="annottext">LabelMap RawCmmStatics
</span><a href="#local-6989586621681043839"><span class="hs-identifier hs-var">info</span></a></span></span><span> </span><span id="local-6989586621681043838"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681043838"><span class="hs-identifier hs-var">lbl</span></a></span></span><span> </span><span id="local-6989586621681043837"><span class="annot"><span class="annottext">[GlobalReg]
</span><a href="#local-6989586621681043837"><span class="hs-identifier hs-var">live</span></a></span></span><span> </span><span id="local-6989586621681043836"><span class="annot"><span class="annottext">CmmGraph
</span><a href="#local-6989586621681043836"><span class="hs-identifier hs-var">graph</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-1072"></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NCGConfig -&gt; Module -&gt; CmmOptM RawCmmDecl -&gt; (RawCmmDecl, [CLabel])
forall a. NCGConfig -&gt; Module -&gt; CmmOptM a -&gt; (a, [CLabel])
</span><a href="GHC.CmmToAsm.html#runCmmOpt"><span class="hs-identifier hs-var">runCmmOpt</span></a></span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681043841"><span class="hs-identifier hs-var">config</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681043840"><span class="hs-identifier hs-var">this_mod</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmOptM RawCmmDecl -&gt; (RawCmmDecl, [CLabel]))
-&gt; CmmOptM RawCmmDecl -&gt; (RawCmmDecl, [CLabel])
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1073"></span><span>      </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621681043834"><span class="annot"><span class="annottext">[CmmBlock]
</span><a href="#local-6989586621681043834"><span class="hs-identifier hs-var">blocks'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(CmmBlock -&gt; CmmOptM CmmBlock) -&gt; [CmmBlock] -&gt; CmmOptM [CmmBlock]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="annot"><span class="annottext">CmmBlock -&gt; CmmOptM CmmBlock
</span><a href="GHC.CmmToAsm.html#cmmBlockConFold"><span class="hs-identifier hs-var">cmmBlockConFold</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmGraph -&gt; [CmmBlock]
</span><a href="GHC.Cmm.Utils.html#toBlockList"><span class="hs-identifier hs-var">toBlockList</span></a></span><span> </span><span class="annot"><span class="annottext">CmmGraph
</span><a href="#local-6989586621681043836"><span class="hs-identifier hs-var">graph</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1074"></span><span>         </span><span class="annot"><span class="annottext">RawCmmDecl -&gt; CmmOptM RawCmmDecl
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(RawCmmDecl -&gt; CmmOptM RawCmmDecl)
-&gt; RawCmmDecl -&gt; CmmOptM RawCmmDecl
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">LabelMap RawCmmStatics
-&gt; CLabel -&gt; [GlobalReg] -&gt; CmmGraph -&gt; RawCmmDecl
forall d h g. h -&gt; CLabel -&gt; [GlobalReg] -&gt; g -&gt; GenCmmDecl d h g
</span><a href="GHC.Cmm.html#CmmProc"><span class="hs-identifier hs-var">CmmProc</span></a></span><span> </span><span class="annot"><span class="annottext">LabelMap RawCmmStatics
</span><a href="#local-6989586621681043839"><span class="hs-identifier hs-var">info</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681043838"><span class="hs-identifier hs-var">lbl</span></a></span><span> </span><span class="annot"><span class="annottext">[GlobalReg]
</span><a href="#local-6989586621681043837"><span class="hs-identifier hs-var">live</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BlockId -&gt; [CmmBlock] -&gt; CmmGraph
</span><a href="GHC.Cmm.Utils.html#ofBlockList"><span class="hs-identifier hs-var">ofBlockList</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmGraph -&gt; BlockId
forall (n :: Extensibility -&gt; Extensibility -&gt; *).
GenCmmGraph n -&gt; BlockId
</span><a href="GHC.Cmm.html#g_entry"><span class="hs-identifier hs-var hs-var">g_entry</span></a></span><span> </span><span class="annot"><span class="annottext">CmmGraph
</span><a href="#local-6989586621681043836"><span class="hs-identifier hs-var">graph</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[CmmBlock]
</span><a href="#local-6989586621681043834"><span class="hs-identifier hs-var">blocks'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1075"></span><span>
</span><span id="line-1076"></span><span class="hs-comment">-- Avoids using unboxed tuples when loading into GHCi</span><span class="hs-cpp">
#if !defined(GHC_LOADED_INTO_GHCI)
</span><span>
</span><span id="line-1079"></span><span class="hs-keyword">type</span><span> </span><span id="OptMResult"><span class="annot"><a href="GHC.CmmToAsm.html#OptMResult"><span class="hs-identifier hs-var">OptMResult</span></a></span></span><span> </span><span id="local-6989586621681043829"><span class="annot"><a href="#local-6989586621681043829"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><a href="#local-6989586621681043829"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.CLabel.html#CLabel"><span class="hs-identifier hs-type">CLabel</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-1080"></span><span>
</span><span id="line-1081"></span><span id="local-6989586621681044859"><span id="local-6989586621681044860"><span class="hs-keyword">pattern</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.html#OptMResult"><span class="hs-identifier hs-type">OptMResult</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621681044860"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621681044859"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><a href="#local-6989586621681044860"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621681044859"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-special">#)</span></span></span><span>
</span><span id="line-1082"></span><span class="hs-keyword">pattern</span><span> </span><span id="%24mOptMResult"><span id="%24bOptMResult"><span id="OptMResult"><span class="annot"><span class="annottext">$mOptMResult :: forall {r} {a} {b}.
(# a, b #) -&gt; (a -&gt; b -&gt; r) -&gt; (Void# -&gt; r) -&gt; r
$bOptMResult :: forall a b. a -&gt; b -&gt; (# a, b #)
</span><a href="GHC.CmmToAsm.html#%24mOptMResult"><span class="hs-identifier hs-var hs-var hs-var">OptMResult</span></a></span></span></span></span><span> </span><span class="annot"><a href="#local-6989586621681043825"><span class="hs-identifier hs-type">x</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681043824"><span class="hs-identifier hs-type">y</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621681043825"><span class="annot"><a href="#local-6989586621681043825"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681043824"><span class="annot"><a href="#local-6989586621681043824"><span class="hs-identifier hs-var">y</span></a></span></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-1083"></span><span class="hs-pragma">{-# COMPLETE</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.html#OptMResult"><span class="hs-pragma hs-type">OptMResult</span></a></span><span> </span><span class="hs-pragma">#-}</span><span class="hs-cpp">
#else
</span><span>
</span><span id="line-1086"></span><span class="hs-keyword">data</span><span> </span><span class="hs-identifier">OptMResult</span><span> </span><span class="hs-identifier">a</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">OptMResult</span><span> </span><span class="hs-glyph">!</span><span class="hs-identifier">a</span><span> </span><span class="hs-glyph">!</span><span class="hs-special">[</span><span class="hs-identifier">CLabel</span><span class="hs-special">]</span><span> </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">Functor</span><span class="hs-special">)</span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-1089"></span><span class="hs-keyword">newtype</span><span> </span><span id="CmmOptM"><span class="annot"><a href="GHC.CmmToAsm.html#CmmOptM"><span class="hs-identifier hs-var">CmmOptM</span></a></span></span><span> </span><span id="local-6989586621681044843"><span class="annot"><a href="#local-6989586621681044843"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="CmmOptM"><span class="annot"><a href="GHC.CmmToAsm.html#CmmOptM"><span class="hs-identifier hs-var">CmmOptM</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Config.html#NCGConfig"><span class="hs-identifier hs-type">NCGConfig</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.CLabel.html#CLabel"><span class="hs-identifier hs-type">CLabel</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.html#OptMResult"><span class="hs-identifier hs-type">OptMResult</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044843"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1090"></span><span>    </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681043819"><span id="local-6989586621681043821"><span class="annot"><span class="annottext">(forall a b. (a -&gt; b) -&gt; CmmOptM a -&gt; CmmOptM b)
-&gt; (forall a b. a -&gt; CmmOptM b -&gt; CmmOptM a) -&gt; Functor CmmOptM
forall a b. a -&gt; CmmOptM b -&gt; CmmOptM a
forall a b. (a -&gt; b) -&gt; CmmOptM a -&gt; CmmOptM b
forall (f :: * -&gt; *).
(forall a b. (a -&gt; b) -&gt; f a -&gt; f b)
-&gt; (forall a b. a -&gt; f b -&gt; f a) -&gt; Functor f
&lt;$ :: forall a b. a -&gt; CmmOptM b -&gt; CmmOptM a
$c&lt;$ :: forall a b. a -&gt; CmmOptM b -&gt; CmmOptM a
fmap :: forall a b. (a -&gt; b) -&gt; CmmOptM a -&gt; CmmOptM b
$cfmap :: forall a b. (a -&gt; b) -&gt; CmmOptM a -&gt; CmmOptM b
</span><a href="../../base/src/GHC.Base.html#Functor"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Functor</span></a></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-1091"></span><span>
</span><span id="line-1092"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621681043807"><span id="local-6989586621681043809"><span id="local-6989586621681043811"><span class="annot"><a href="../../base/src/GHC.Base.html#Applicative"><span class="hs-identifier hs-type">Applicative</span></a></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.html#CmmOptM"><span class="hs-identifier hs-type">CmmOptM</span></a></span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-1093"></span><span>    </span><span id="local-6989586621681043805"><span class="annot"><span class="annottext">pure :: forall a. a -&gt; CmmOptM a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var hs-var hs-var hs-var">pure</span></a></span></span><span> </span><span id="local-6989586621681043804"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681043804"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(NCGConfig -&gt; Module -&gt; [CLabel] -&gt; OptMResult a) -&gt; CmmOptM a
forall a.
(NCGConfig -&gt; Module -&gt; [CLabel] -&gt; OptMResult a) -&gt; CmmOptM a
</span><a href="GHC.CmmToAsm.html#CmmOptM"><span class="hs-identifier hs-var">CmmOptM</span></a></span><span> </span><span class="annot"><span class="annottext">((NCGConfig -&gt; Module -&gt; [CLabel] -&gt; OptMResult a) -&gt; CmmOptM a)
-&gt; (NCGConfig -&gt; Module -&gt; [CLabel] -&gt; OptMResult a) -&gt; CmmOptM a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span class="annot"><span class="annottext">NCGConfig
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Module
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681043803"><span class="annot"><span class="annottext">[CLabel]
</span><a href="#local-6989586621681043803"><span class="hs-identifier hs-var">imports</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a -&gt; [CLabel] -&gt; OptMResult a
forall a b. a -&gt; b -&gt; (# a, b #)
</span><a href="GHC.CmmToAsm.html#OptMResult"><span class="hs-identifier hs-var">OptMResult</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681043804"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">[CLabel]
</span><a href="#local-6989586621681043803"><span class="hs-identifier hs-var">imports</span></a></span><span>
</span><span id="line-1094"></span><span>    </span><span id="local-6989586621681043801"><span class="annot"><span class="annottext">&lt;*&gt; :: forall a b. CmmOptM (a -&gt; b) -&gt; CmmOptM a -&gt; CmmOptM b
</span><a href="../../base/src/GHC.Base.html#%3C%2A%3E"><span class="hs-operator hs-var hs-var hs-var hs-var">(&lt;*&gt;)</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmOptM (a -&gt; b) -&gt; CmmOptM a -&gt; CmmOptM b
forall (m :: * -&gt; *) a b. Monad m =&gt; m (a -&gt; b) -&gt; m a -&gt; m b
</span><a href="../../base/src/GHC.Base.html#ap"><span class="hs-identifier hs-var">ap</span></a></span><span>
</span><span id="line-1095"></span><span>
</span><span id="line-1096"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621681043793"><span id="local-6989586621681043795"><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.html#CmmOptM"><span class="hs-identifier hs-type">CmmOptM</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-1097"></span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.html#CmmOptM"><span class="hs-identifier hs-type">CmmOptM</span></a></span><span> </span><span id="local-6989586621681043791"><span class="annot"><span class="annottext">NCGConfig -&gt; Module -&gt; [CLabel] -&gt; OptMResult a
</span><a href="#local-6989586621681043791"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681043790"><span class="annot"><span class="annottext">&gt;&gt;= :: forall a b. CmmOptM a -&gt; (a -&gt; CmmOptM b) -&gt; CmmOptM b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var hs-var hs-var hs-var">&gt;&gt;=</span></a></span></span><span> </span><span id="local-6989586621681043789"><span class="annot"><span class="annottext">a -&gt; CmmOptM b
</span><a href="#local-6989586621681043789"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1098"></span><span>    </span><span class="annot"><span class="annottext">(NCGConfig -&gt; Module -&gt; [CLabel] -&gt; OptMResult b) -&gt; CmmOptM b
forall a.
(NCGConfig -&gt; Module -&gt; [CLabel] -&gt; OptMResult a) -&gt; CmmOptM a
</span><a href="GHC.CmmToAsm.html#CmmOptM"><span class="hs-identifier hs-var">CmmOptM</span></a></span><span> </span><span class="annot"><span class="annottext">((NCGConfig -&gt; Module -&gt; [CLabel] -&gt; OptMResult b) -&gt; CmmOptM b)
-&gt; (NCGConfig -&gt; Module -&gt; [CLabel] -&gt; OptMResult b) -&gt; CmmOptM b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621681043788"><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681043788"><span class="hs-identifier hs-var">config</span></a></span></span><span> </span><span id="local-6989586621681043787"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681043787"><span class="hs-identifier hs-var">this_mod</span></a></span></span><span> </span><span id="local-6989586621681043786"><span class="annot"><span class="annottext">[CLabel]
</span><a href="#local-6989586621681043786"><span class="hs-identifier hs-var">imports0</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-1099"></span><span>                </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">NCGConfig -&gt; Module -&gt; [CLabel] -&gt; OptMResult a
</span><a href="#local-6989586621681043791"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681043788"><span class="hs-identifier hs-var">config</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681043787"><span class="hs-identifier hs-var">this_mod</span></a></span><span> </span><span class="annot"><span class="annottext">[CLabel]
</span><a href="#local-6989586621681043786"><span class="hs-identifier hs-var">imports0</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1100"></span><span>                  </span><span class="annot"><a href="GHC.CmmToAsm.html#OptMResult"><span class="hs-identifier hs-type">OptMResult</span></a></span><span> </span><span id="local-6989586621681043785"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681043785"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621681043784"><span class="annot"><span class="annottext">[CLabel]
</span><a href="#local-6989586621681043784"><span class="hs-identifier hs-var">imports1</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-1101"></span><span>                    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">a -&gt; CmmOptM b
</span><a href="#local-6989586621681043789"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681043785"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1102"></span><span>                      </span><span class="annot"><a href="GHC.CmmToAsm.html#CmmOptM"><span class="hs-identifier hs-type">CmmOptM</span></a></span><span> </span><span id="local-6989586621681043783"><span class="annot"><span class="annottext">NCGConfig -&gt; Module -&gt; [CLabel] -&gt; OptMResult b
</span><a href="#local-6989586621681043783"><span class="hs-identifier hs-var">g'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">NCGConfig -&gt; Module -&gt; [CLabel] -&gt; OptMResult b
</span><a href="#local-6989586621681043783"><span class="hs-identifier hs-var">g'</span></a></span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681043788"><span class="hs-identifier hs-var">config</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681043787"><span class="hs-identifier hs-var">this_mod</span></a></span><span> </span><span class="annot"><span class="annottext">[CLabel]
</span><a href="#local-6989586621681043784"><span class="hs-identifier hs-var">imports1</span></a></span><span>
</span><span id="line-1103"></span><span>
</span><span id="line-1104"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.PIC.html#CmmMakeDynamicReferenceM"><span class="hs-identifier hs-type">CmmMakeDynamicReferenceM</span></a></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.html#CmmOptM"><span class="hs-identifier hs-type">CmmOptM</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-1105"></span><span>    </span><span id="local-6989586621681043777"><span class="annot"><span class="annottext">addImport :: CLabel -&gt; CmmOptM ()
</span><a href="GHC.CmmToAsm.PIC.html#addImport"><span class="hs-identifier hs-var hs-var hs-var hs-var">addImport</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CLabel -&gt; CmmOptM ()
</span><a href="GHC.CmmToAsm.html#addImportCmmOpt"><span class="hs-identifier hs-var">addImportCmmOpt</span></a></span><span>
</span><span id="line-1106"></span><span>    </span><span id="local-6989586621681043774"><span class="annot"><span class="annottext">getThisModule :: CmmOptM Module
</span><a href="GHC.CmmToAsm.PIC.html#getThisModule"><span class="hs-identifier hs-var hs-var hs-var hs-var">getThisModule</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(NCGConfig -&gt; Module -&gt; [CLabel] -&gt; OptMResult Module)
-&gt; CmmOptM Module
forall a.
(NCGConfig -&gt; Module -&gt; [CLabel] -&gt; OptMResult a) -&gt; CmmOptM a
</span><a href="GHC.CmmToAsm.html#CmmOptM"><span class="hs-identifier hs-var">CmmOptM</span></a></span><span> </span><span class="annot"><span class="annottext">((NCGConfig -&gt; Module -&gt; [CLabel] -&gt; OptMResult Module)
 -&gt; CmmOptM Module)
-&gt; (NCGConfig -&gt; Module -&gt; [CLabel] -&gt; OptMResult Module)
-&gt; CmmOptM Module
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span class="annot"><span class="annottext">NCGConfig
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681043772"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681043772"><span class="hs-identifier hs-var">this_mod</span></a></span></span><span> </span><span id="local-6989586621681043771"><span class="annot"><span class="annottext">[CLabel]
</span><a href="#local-6989586621681043771"><span class="hs-identifier hs-var">imports</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Module -&gt; [CLabel] -&gt; OptMResult Module
forall a b. a -&gt; b -&gt; (# a, b #)
</span><a href="GHC.CmmToAsm.html#OptMResult"><span class="hs-identifier hs-var">OptMResult</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681043772"><span class="hs-identifier hs-var">this_mod</span></a></span><span> </span><span class="annot"><span class="annottext">[CLabel]
</span><a href="#local-6989586621681043771"><span class="hs-identifier hs-var">imports</span></a></span><span>
</span><span id="line-1107"></span><span>
</span><span id="line-1108"></span><span class="annot"><a href="GHC.CmmToAsm.html#addImportCmmOpt"><span class="hs-identifier hs-type">addImportCmmOpt</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.CLabel.html#CLabel"><span class="hs-identifier hs-type">CLabel</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.html#CmmOptM"><span class="hs-identifier hs-type">CmmOptM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-1109"></span><span id="addImportCmmOpt"><span class="annot"><span class="annottext">addImportCmmOpt :: CLabel -&gt; CmmOptM ()
</span><a href="GHC.CmmToAsm.html#addImportCmmOpt"><span class="hs-identifier hs-var hs-var">addImportCmmOpt</span></a></span></span><span> </span><span id="local-6989586621681043770"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681043770"><span class="hs-identifier hs-var">lbl</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(NCGConfig -&gt; Module -&gt; [CLabel] -&gt; OptMResult ()) -&gt; CmmOptM ()
forall a.
(NCGConfig -&gt; Module -&gt; [CLabel] -&gt; OptMResult a) -&gt; CmmOptM a
</span><a href="GHC.CmmToAsm.html#CmmOptM"><span class="hs-identifier hs-var">CmmOptM</span></a></span><span> </span><span class="annot"><span class="annottext">((NCGConfig -&gt; Module -&gt; [CLabel] -&gt; OptMResult ()) -&gt; CmmOptM ())
-&gt; (NCGConfig -&gt; Module -&gt; [CLabel] -&gt; OptMResult ()) -&gt; CmmOptM ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span class="annot"><span class="annottext">NCGConfig
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Module
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681043769"><span class="annot"><span class="annottext">[CLabel]
</span><a href="#local-6989586621681043769"><span class="hs-identifier hs-var">imports</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">() -&gt; [CLabel] -&gt; OptMResult ()
forall a b. a -&gt; b -&gt; (# a, b #)
</span><a href="GHC.CmmToAsm.html#OptMResult"><span class="hs-identifier hs-var">OptMResult</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681043770"><span class="hs-identifier hs-var">lbl</span></a></span><span class="annot"><span class="annottext">CLabel -&gt; [CLabel] -&gt; [CLabel]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">[CLabel]
</span><a href="#local-6989586621681043769"><span class="hs-identifier hs-var">imports</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1110"></span><span>
</span><span id="line-1111"></span><span class="annot"><a href="GHC.CmmToAsm.html#getCmmOptConfig"><span class="hs-identifier hs-type">getCmmOptConfig</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.html#CmmOptM"><span class="hs-identifier hs-type">CmmOptM</span></a></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Config.html#NCGConfig"><span class="hs-identifier hs-type">NCGConfig</span></a></span><span>
</span><span id="line-1112"></span><span id="getCmmOptConfig"><span class="annot"><span class="annottext">getCmmOptConfig :: CmmOptM NCGConfig
</span><a href="GHC.CmmToAsm.html#getCmmOptConfig"><span class="hs-identifier hs-var hs-var">getCmmOptConfig</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(NCGConfig -&gt; Module -&gt; [CLabel] -&gt; OptMResult NCGConfig)
-&gt; CmmOptM NCGConfig
forall a.
(NCGConfig -&gt; Module -&gt; [CLabel] -&gt; OptMResult a) -&gt; CmmOptM a
</span><a href="GHC.CmmToAsm.html#CmmOptM"><span class="hs-identifier hs-var">CmmOptM</span></a></span><span> </span><span class="annot"><span class="annottext">((NCGConfig -&gt; Module -&gt; [CLabel] -&gt; OptMResult NCGConfig)
 -&gt; CmmOptM NCGConfig)
-&gt; (NCGConfig -&gt; Module -&gt; [CLabel] -&gt; OptMResult NCGConfig)
-&gt; CmmOptM NCGConfig
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621681043767"><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681043767"><span class="hs-identifier hs-var">config</span></a></span></span><span> </span><span class="annot"><span class="annottext">Module
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681043766"><span class="annot"><span class="annottext">[CLabel]
</span><a href="#local-6989586621681043766"><span class="hs-identifier hs-var">imports</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">NCGConfig -&gt; [CLabel] -&gt; OptMResult NCGConfig
forall a b. a -&gt; b -&gt; (# a, b #)
</span><a href="GHC.CmmToAsm.html#OptMResult"><span class="hs-identifier hs-var">OptMResult</span></a></span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681043767"><span class="hs-identifier hs-var">config</span></a></span><span> </span><span class="annot"><span class="annottext">[CLabel]
</span><a href="#local-6989586621681043766"><span class="hs-identifier hs-var">imports</span></a></span><span>
</span><span id="line-1113"></span><span>
</span><span id="line-1114"></span><span id="local-6989586621681044865"><span class="annot"><a href="GHC.CmmToAsm.html#runCmmOpt"><span class="hs-identifier hs-type">runCmmOpt</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Config.html#NCGConfig"><span class="hs-identifier hs-type">NCGConfig</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.html#CmmOptM"><span class="hs-identifier hs-type">CmmOptM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044865"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621681044865"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.CLabel.html#CLabel"><span class="hs-identifier hs-type">CLabel</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span></span><span>
</span><span id="line-1115"></span><span id="runCmmOpt"><span class="annot"><span class="annottext">runCmmOpt :: forall a. NCGConfig -&gt; Module -&gt; CmmOptM a -&gt; (a, [CLabel])
</span><a href="GHC.CmmToAsm.html#runCmmOpt"><span class="hs-identifier hs-var hs-var">runCmmOpt</span></a></span></span><span> </span><span id="local-6989586621681043765"><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681043765"><span class="hs-identifier hs-var">config</span></a></span></span><span> </span><span id="local-6989586621681043764"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681043764"><span class="hs-identifier hs-var">this_mod</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.html#CmmOptM"><span class="hs-identifier hs-type">CmmOptM</span></a></span><span> </span><span id="local-6989586621681043763"><span class="annot"><span class="annottext">NCGConfig -&gt; Module -&gt; [CLabel] -&gt; OptMResult a
</span><a href="#local-6989586621681043763"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1116"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">NCGConfig -&gt; Module -&gt; [CLabel] -&gt; OptMResult a
</span><a href="#local-6989586621681043763"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681043765"><span class="hs-identifier hs-var">config</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681043764"><span class="hs-identifier hs-var">this_mod</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1117"></span><span>    </span><span class="annot"><a href="GHC.CmmToAsm.html#OptMResult"><span class="hs-identifier hs-type">OptMResult</span></a></span><span> </span><span id="local-6989586621681043762"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681043762"><span class="hs-identifier hs-var">result</span></a></span></span><span> </span><span id="local-6989586621681043761"><span class="annot"><span class="annottext">[CLabel]
</span><a href="#local-6989586621681043761"><span class="hs-identifier hs-var">imports</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681043762"><span class="hs-identifier hs-var">result</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[CLabel]
</span><a href="#local-6989586621681043761"><span class="hs-identifier hs-var">imports</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1118"></span><span>
</span><span id="line-1119"></span><span class="annot"><a href="GHC.CmmToAsm.html#cmmBlockConFold"><span class="hs-identifier hs-type">cmmBlockConFold</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.html#CmmBlock"><span class="hs-identifier hs-type">CmmBlock</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.html#CmmOptM"><span class="hs-identifier hs-type">CmmOptM</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.html#CmmBlock"><span class="hs-identifier hs-type">CmmBlock</span></a></span><span>
</span><span id="line-1120"></span><span id="cmmBlockConFold"><span class="annot"><span class="annottext">cmmBlockConFold :: CmmBlock -&gt; CmmOptM CmmBlock
</span><a href="GHC.CmmToAsm.html#cmmBlockConFold"><span class="hs-identifier hs-var hs-var">cmmBlockConFold</span></a></span></span><span> </span><span id="local-6989586621681043760"><span class="annot"><span class="annottext">CmmBlock
</span><a href="#local-6989586621681043760"><span class="hs-identifier hs-var">block</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-1121"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681043759"><span class="annot"><span class="annottext">CmmNode C O
</span><a href="#local-6989586621681043759"><span class="hs-identifier hs-var">entry</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681043758"><span class="annot"><span class="annottext">Block CmmNode O O
</span><a href="#local-6989586621681043758"><span class="hs-identifier hs-var">middle</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681043757"><span class="annot"><span class="annottext">CmmNode O C
</span><a href="#local-6989586621681043757"><span class="hs-identifier hs-var">last</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmBlock -&gt; (CmmNode C O, Block CmmNode O O, CmmNode O C)
forall (n :: Extensibility -&gt; Extensibility -&gt; *).
Block n C C -&gt; (n C O, Block n O O, n O C)
</span><a href="GHC.Cmm.Dataflow.Block.html#blockSplit"><span class="hs-identifier hs-var">blockSplit</span></a></span><span> </span><span class="annot"><span class="annottext">CmmBlock
</span><a href="#local-6989586621681043760"><span class="hs-identifier hs-var">block</span></a></span><span>
</span><span id="line-1122"></span><span>      </span><span id="local-6989586621681043755"><span class="annot"><span class="annottext">stmts :: [CmmNode O O]
</span><a href="#local-6989586621681043755"><span class="hs-identifier hs-var hs-var">stmts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Block CmmNode O O -&gt; [CmmNode O O]
forall (n :: Extensibility -&gt; Extensibility -&gt; *).
Block n O O -&gt; [n O O]
</span><a href="GHC.Cmm.Dataflow.Block.html#blockToList"><span class="hs-identifier hs-var">blockToList</span></a></span><span> </span><span class="annot"><span class="annottext">Block CmmNode O O
</span><a href="#local-6989586621681043758"><span class="hs-identifier hs-var">middle</span></a></span><span>
</span><span id="line-1123"></span><span>  </span><span id="local-6989586621681043753"><span class="annot"><span class="annottext">[CmmNode O O]
</span><a href="#local-6989586621681043753"><span class="hs-identifier hs-var">stmts'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(CmmNode O O -&gt; CmmOptM (CmmNode O O))
-&gt; [CmmNode O O] -&gt; CmmOptM [CmmNode O O]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="annot"><span class="annottext">CmmNode O O -&gt; CmmOptM (CmmNode O O)
forall (e :: Extensibility) (x :: Extensibility).
CmmNode e x -&gt; CmmOptM (CmmNode e x)
</span><a href="GHC.CmmToAsm.html#cmmStmtConFold"><span class="hs-identifier hs-var">cmmStmtConFold</span></a></span><span> </span><span class="annot"><span class="annottext">[CmmNode O O]
</span><a href="#local-6989586621681043755"><span class="hs-identifier hs-var">stmts</span></a></span><span>
</span><span id="line-1124"></span><span>  </span><span id="local-6989586621681043751"><span class="annot"><span class="annottext">CmmNode O C
</span><a href="#local-6989586621681043751"><span class="hs-identifier hs-var">last'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">CmmNode O C -&gt; CmmOptM (CmmNode O C)
forall (e :: Extensibility) (x :: Extensibility).
CmmNode e x -&gt; CmmOptM (CmmNode e x)
</span><a href="GHC.CmmToAsm.html#cmmStmtConFold"><span class="hs-identifier hs-var">cmmStmtConFold</span></a></span><span> </span><span class="annot"><span class="annottext">CmmNode O C
</span><a href="#local-6989586621681043757"><span class="hs-identifier hs-var">last</span></a></span><span>
</span><span id="line-1125"></span><span>  </span><span class="annot"><span class="annottext">CmmBlock -&gt; CmmOptM CmmBlock
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmBlock -&gt; CmmOptM CmmBlock) -&gt; CmmBlock -&gt; CmmOptM CmmBlock
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CmmNode C O -&gt; Block CmmNode O O -&gt; CmmNode O C -&gt; CmmBlock
forall (n :: Extensibility -&gt; Extensibility -&gt; *).
n C O -&gt; Block n O O -&gt; n O C -&gt; Block n C C
</span><a href="GHC.Cmm.Dataflow.Block.html#blockJoin"><span class="hs-identifier hs-var">blockJoin</span></a></span><span> </span><span class="annot"><span class="annottext">CmmNode C O
</span><a href="#local-6989586621681043759"><span class="hs-identifier hs-var">entry</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[CmmNode O O] -&gt; Block CmmNode O O
forall (n :: Extensibility -&gt; Extensibility -&gt; *).
[n O O] -&gt; Block n O O
</span><a href="GHC.Cmm.Dataflow.Block.html#blockFromList"><span class="hs-identifier hs-var">blockFromList</span></a></span><span> </span><span class="annot"><span class="annottext">[CmmNode O O]
</span><a href="#local-6989586621681043753"><span class="hs-identifier hs-var">stmts'</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">CmmNode O C
</span><a href="#local-6989586621681043751"><span class="hs-identifier hs-var">last'</span></a></span><span>
</span><span id="line-1126"></span><span>
</span><span id="line-1127"></span><span class="hs-comment">-- This does three optimizations, but they're very quick to check, so we don't</span><span>
</span><span id="line-1128"></span><span class="hs-comment">-- bother turning them off even when the Hoopl code is active.  Since</span><span>
</span><span id="line-1129"></span><span class="hs-comment">-- this is on the old Cmm representation, we can't reuse the code either:</span><span>
</span><span id="line-1130"></span><span class="hs-comment">--  * reg = reg      --&gt; nop</span><span>
</span><span id="line-1131"></span><span class="hs-comment">--  * if 0 then jump --&gt; nop</span><span>
</span><span id="line-1132"></span><span class="hs-comment">--  * if 1 then jump --&gt; jump</span><span>
</span><span id="line-1133"></span><span class="hs-comment">-- We might be tempted to skip this step entirely of not Opt_PIC, but</span><span>
</span><span id="line-1134"></span><span class="hs-comment">-- there is some PowerPC code for the non-PIC case, which would also</span><span>
</span><span id="line-1135"></span><span class="hs-comment">-- have to be separated.</span><span>
</span><span id="line-1136"></span><span id="local-6989586621681044822"><span id="local-6989586621681044823"><span class="annot"><a href="GHC.CmmToAsm.html#cmmStmtConFold"><span class="hs-identifier hs-type">cmmStmtConFold</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmNode"><span class="hs-identifier hs-type">CmmNode</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044823"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044822"><span class="hs-identifier hs-type">x</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.html#CmmOptM"><span class="hs-identifier hs-type">CmmOptM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmNode"><span class="hs-identifier hs-type">CmmNode</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044823"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681044822"><span class="hs-identifier hs-type">x</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-1137"></span><span id="cmmStmtConFold"><span class="annot"><span class="annottext">cmmStmtConFold :: forall (e :: Extensibility) (x :: Extensibility).
CmmNode e x -&gt; CmmOptM (CmmNode e x)
</span><a href="GHC.CmmToAsm.html#cmmStmtConFold"><span class="hs-identifier hs-var hs-var">cmmStmtConFold</span></a></span></span><span> </span><span id="local-6989586621681043747"><span class="annot"><span class="annottext">CmmNode e x
</span><a href="#local-6989586621681043747"><span class="hs-identifier hs-var">stmt</span></a></span></span><span>
</span><span id="line-1138"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">CmmNode e x
</span><a href="#local-6989586621681043747"><span class="hs-identifier hs-var">stmt</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1139"></span><span>        </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmAssign"><span class="hs-identifier hs-type">CmmAssign</span></a></span><span> </span><span id="local-6989586621681043739"><span class="annot"><span class="annottext">CmmReg
</span><a href="#local-6989586621681043739"><span class="hs-identifier hs-var">reg</span></a></span></span><span> </span><span id="local-6989586621681043738"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043738"><span class="hs-identifier hs-var">src</span></a></span></span><span>
</span><span id="line-1140"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621681043737"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043737"><span class="hs-identifier hs-var">src'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReferenceKind -&gt; CmmExpr -&gt; CmmOptM CmmExpr
</span><a href="GHC.CmmToAsm.html#cmmExprConFold"><span class="hs-identifier hs-var">cmmExprConFold</span></a></span><span> </span><span class="annot"><span class="annottext">ReferenceKind
</span><a href="GHC.CmmToAsm.PIC.html#DataReference"><span class="hs-identifier hs-var">DataReference</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043738"><span class="hs-identifier hs-var">src</span></a></span><span>
</span><span id="line-1141"></span><span>                 </span><span class="annot"><span class="annottext">CmmNode O O -&gt; CmmOptM (CmmNode O O)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmNode O O -&gt; CmmOptM (CmmNode O O))
-&gt; CmmNode O O -&gt; CmmOptM (CmmNode O O)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043737"><span class="hs-identifier hs-var">src'</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1142"></span><span>                   </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmReg"><span class="hs-identifier hs-type">CmmReg</span></a></span><span> </span><span id="local-6989586621681043733"><span class="annot"><span class="annottext">CmmReg
</span><a href="#local-6989586621681043733"><span class="hs-identifier hs-var">reg'</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">CmmReg
</span><a href="#local-6989586621681043739"><span class="hs-identifier hs-var">reg</span></a></span><span> </span><span class="annot"><span class="annottext">CmmReg -&gt; CmmReg -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">CmmReg
</span><a href="#local-6989586621681043733"><span class="hs-identifier hs-var">reg'</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FastString -&gt; CmmNode O O
</span><a href="GHC.Cmm.Node.html#CmmComment"><span class="hs-identifier hs-var">CmmComment</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;nop&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-1143"></span><span>                   </span><span id="local-6989586621681043730"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043730"><span class="hs-identifier hs-var">new_src</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmReg -&gt; CmmExpr -&gt; CmmNode O O
</span><a href="GHC.Cmm.Node.html#CmmAssign"><span class="hs-identifier hs-var">CmmAssign</span></a></span><span> </span><span class="annot"><span class="annottext">CmmReg
</span><a href="#local-6989586621681043739"><span class="hs-identifier hs-var">reg</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043730"><span class="hs-identifier hs-var">new_src</span></a></span><span>
</span><span id="line-1144"></span><span>
</span><span id="line-1145"></span><span>        </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmStore"><span class="hs-identifier hs-type">CmmStore</span></a></span><span> </span><span id="local-6989586621681043723"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043723"><span class="hs-identifier hs-var">addr</span></a></span></span><span> </span><span id="local-6989586621681043722"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043722"><span class="hs-identifier hs-var">src</span></a></span></span><span>
</span><span id="line-1146"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621681043721"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043721"><span class="hs-identifier hs-var">addr'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReferenceKind -&gt; CmmExpr -&gt; CmmOptM CmmExpr
</span><a href="GHC.CmmToAsm.html#cmmExprConFold"><span class="hs-identifier hs-var">cmmExprConFold</span></a></span><span> </span><span class="annot"><span class="annottext">ReferenceKind
</span><a href="GHC.CmmToAsm.PIC.html#DataReference"><span class="hs-identifier hs-var">DataReference</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043723"><span class="hs-identifier hs-var">addr</span></a></span><span>
</span><span id="line-1147"></span><span>                 </span><span id="local-6989586621681043720"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043720"><span class="hs-identifier hs-var">src'</span></a></span></span><span>  </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReferenceKind -&gt; CmmExpr -&gt; CmmOptM CmmExpr
</span><a href="GHC.CmmToAsm.html#cmmExprConFold"><span class="hs-identifier hs-var">cmmExprConFold</span></a></span><span> </span><span class="annot"><span class="annottext">ReferenceKind
</span><a href="GHC.CmmToAsm.PIC.html#DataReference"><span class="hs-identifier hs-var">DataReference</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043722"><span class="hs-identifier hs-var">src</span></a></span><span>
</span><span id="line-1148"></span><span>                 </span><span class="annot"><span class="annottext">CmmNode O O -&gt; CmmOptM (CmmNode O O)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmNode O O -&gt; CmmOptM (CmmNode O O))
-&gt; CmmNode O O -&gt; CmmOptM (CmmNode O O)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; CmmExpr -&gt; CmmNode O O
</span><a href="GHC.Cmm.Node.html#CmmStore"><span class="hs-identifier hs-var">CmmStore</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043721"><span class="hs-identifier hs-var">addr'</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043720"><span class="hs-identifier hs-var">src'</span></a></span><span>
</span><span id="line-1149"></span><span>
</span><span id="line-1150"></span><span>        </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmCall"><span class="hs-identifier hs-type">CmmCall</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">cml_target :: CmmNode O C -&gt; CmmExpr
</span><a href="GHC.Cmm.Node.html#cml_target"><span class="hs-identifier hs-var">cml_target</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681043713"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043713"><span class="hs-identifier hs-var">addr</span></a></span></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-1151"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621681043712"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043712"><span class="hs-identifier hs-var">addr'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReferenceKind -&gt; CmmExpr -&gt; CmmOptM CmmExpr
</span><a href="GHC.CmmToAsm.html#cmmExprConFold"><span class="hs-identifier hs-var">cmmExprConFold</span></a></span><span> </span><span class="annot"><span class="annottext">ReferenceKind
</span><a href="GHC.CmmToAsm.PIC.html#JumpReference"><span class="hs-identifier hs-var">JumpReference</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043713"><span class="hs-identifier hs-var">addr</span></a></span><span>
</span><span id="line-1152"></span><span>                 </span><span class="annot"><span class="annottext">CmmNode e x -&gt; CmmOptM (CmmNode e x)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmNode e x -&gt; CmmOptM (CmmNode e x))
-&gt; CmmNode e x -&gt; CmmOptM (CmmNode e x)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CmmNode e x
</span><a href="#local-6989586621681043747"><span class="hs-identifier hs-var">stmt</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">cml_target :: CmmExpr
</span><a href="GHC.Cmm.Node.html#cml_target"><span class="hs-identifier hs-var">cml_target</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043712"><span class="hs-identifier hs-var">addr'</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-1153"></span><span>
</span><span id="line-1154"></span><span>        </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmUnsafeForeignCall"><span class="hs-identifier hs-type">CmmUnsafeForeignCall</span></a></span><span> </span><span id="local-6989586621681043699"><span class="annot"><span class="annottext">ForeignTarget
</span><a href="#local-6989586621681043699"><span class="hs-identifier hs-var">target</span></a></span></span><span> </span><span id="local-6989586621681043698"><span class="annot"><span class="annottext">[CmmFormal]
</span><a href="#local-6989586621681043698"><span class="hs-identifier hs-var">regs</span></a></span></span><span> </span><span id="local-6989586621681043697"><span class="annot"><span class="annottext">[CmmExpr]
</span><a href="#local-6989586621681043697"><span class="hs-identifier hs-var">args</span></a></span></span><span>
</span><span id="line-1155"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621681043696"><span class="annot"><span class="annottext">ForeignTarget
</span><a href="#local-6989586621681043696"><span class="hs-identifier hs-var">target'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">ForeignTarget
</span><a href="#local-6989586621681043699"><span class="hs-identifier hs-var">target</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1156"></span><span>                              </span><span class="annot"><a href="GHC.Cmm.Node.html#ForeignTarget"><span class="hs-identifier hs-type">ForeignTarget</span></a></span><span> </span><span id="local-6989586621681043694"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043694"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span id="local-6989586621681043693"><span class="annot"><span class="annottext">ForeignConvention
</span><a href="#local-6989586621681043693"><span class="hs-identifier hs-var">conv</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-1157"></span><span>                                </span><span id="local-6989586621681043692"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043692"><span class="hs-identifier hs-var">e'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReferenceKind -&gt; CmmExpr -&gt; CmmOptM CmmExpr
</span><a href="GHC.CmmToAsm.html#cmmExprConFold"><span class="hs-identifier hs-var">cmmExprConFold</span></a></span><span> </span><span class="annot"><span class="annottext">ReferenceKind
</span><a href="GHC.CmmToAsm.PIC.html#CallReference"><span class="hs-identifier hs-var">CallReference</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043694"><span class="hs-identifier hs-var">e</span></a></span><span>
</span><span id="line-1158"></span><span>                                </span><span class="annot"><span class="annottext">ForeignTarget -&gt; CmmOptM ForeignTarget
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(ForeignTarget -&gt; CmmOptM ForeignTarget)
-&gt; ForeignTarget -&gt; CmmOptM ForeignTarget
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; ForeignConvention -&gt; ForeignTarget
</span><a href="GHC.Cmm.Node.html#ForeignTarget"><span class="hs-identifier hs-var">ForeignTarget</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043692"><span class="hs-identifier hs-var">e'</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignConvention
</span><a href="#local-6989586621681043693"><span class="hs-identifier hs-var">conv</span></a></span><span>
</span><span id="line-1159"></span><span>                              </span><span class="annot"><a href="GHC.Cmm.Node.html#PrimTarget"><span class="hs-identifier hs-type">PrimTarget</span></a></span><span> </span><span class="annot"><span class="annottext">CallishMachOp
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-1160"></span><span>                                </span><span class="annot"><span class="annottext">ForeignTarget -&gt; CmmOptM ForeignTarget
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignTarget
</span><a href="#local-6989586621681043699"><span class="hs-identifier hs-var">target</span></a></span><span>
</span><span id="line-1161"></span><span>                 </span><span id="local-6989586621681043689"><span class="annot"><span class="annottext">[CmmExpr]
</span><a href="#local-6989586621681043689"><span class="hs-identifier hs-var">args'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; CmmOptM CmmExpr) -&gt; [CmmExpr] -&gt; CmmOptM [CmmExpr]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ReferenceKind -&gt; CmmExpr -&gt; CmmOptM CmmExpr
</span><a href="GHC.CmmToAsm.html#cmmExprConFold"><span class="hs-identifier hs-var">cmmExprConFold</span></a></span><span> </span><span class="annot"><span class="annottext">ReferenceKind
</span><a href="GHC.CmmToAsm.PIC.html#DataReference"><span class="hs-identifier hs-var">DataReference</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[CmmExpr]
</span><a href="#local-6989586621681043697"><span class="hs-identifier hs-var">args</span></a></span><span>
</span><span id="line-1162"></span><span>                 </span><span class="annot"><span class="annottext">CmmNode O O -&gt; CmmOptM (CmmNode O O)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmNode O O -&gt; CmmOptM (CmmNode O O))
-&gt; CmmNode O O -&gt; CmmOptM (CmmNode O O)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignTarget -&gt; [CmmFormal] -&gt; [CmmExpr] -&gt; CmmNode O O
</span><a href="GHC.Cmm.Node.html#CmmUnsafeForeignCall"><span class="hs-identifier hs-var">CmmUnsafeForeignCall</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignTarget
</span><a href="#local-6989586621681043696"><span class="hs-identifier hs-var">target'</span></a></span><span> </span><span class="annot"><span class="annottext">[CmmFormal]
</span><a href="#local-6989586621681043698"><span class="hs-identifier hs-var">regs</span></a></span><span> </span><span class="annot"><span class="annottext">[CmmExpr]
</span><a href="#local-6989586621681043689"><span class="hs-identifier hs-var">args'</span></a></span><span>
</span><span id="line-1163"></span><span>
</span><span id="line-1164"></span><span>        </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmCondBranch"><span class="hs-identifier hs-type">CmmCondBranch</span></a></span><span> </span><span id="local-6989586621681043680"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043680"><span class="hs-identifier hs-var">test</span></a></span></span><span> </span><span id="local-6989586621681043679"><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681043679"><span class="hs-identifier hs-var">true</span></a></span></span><span> </span><span id="local-6989586621681043678"><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681043678"><span class="hs-identifier hs-var">false</span></a></span></span><span> </span><span id="local-6989586621681043677"><span class="annot"><span class="annottext">Maybe Bool
</span><a href="#local-6989586621681043677"><span class="hs-identifier hs-var">likely</span></a></span></span><span>
</span><span id="line-1165"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621681043676"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043676"><span class="hs-identifier hs-var">test'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReferenceKind -&gt; CmmExpr -&gt; CmmOptM CmmExpr
</span><a href="GHC.CmmToAsm.html#cmmExprConFold"><span class="hs-identifier hs-var">cmmExprConFold</span></a></span><span> </span><span class="annot"><span class="annottext">ReferenceKind
</span><a href="GHC.CmmToAsm.PIC.html#DataReference"><span class="hs-identifier hs-var">DataReference</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043680"><span class="hs-identifier hs-var">test</span></a></span><span>
</span><span id="line-1166"></span><span>                 </span><span class="annot"><span class="annottext">CmmNode O C -&gt; CmmOptM (CmmNode O C)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmNode O C -&gt; CmmOptM (CmmNode O C))
-&gt; CmmNode O C -&gt; CmmOptM (CmmNode O C)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043676"><span class="hs-identifier hs-var">test'</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1167"></span><span>                   </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-type">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-type">CmmInt</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">BlockId -&gt; CmmNode O C
</span><a href="GHC.Cmm.Node.html#CmmBranch"><span class="hs-identifier hs-var">CmmBranch</span></a></span><span> </span><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681043678"><span class="hs-identifier hs-var">false</span></a></span><span>
</span><span id="line-1168"></span><span>                   </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-type">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-type">CmmInt</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">BlockId -&gt; CmmNode O C
</span><a href="GHC.Cmm.Node.html#CmmBranch"><span class="hs-identifier hs-var">CmmBranch</span></a></span><span> </span><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681043679"><span class="hs-identifier hs-var">true</span></a></span><span>
</span><span id="line-1169"></span><span>                   </span><span id="local-6989586621681043672"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043672"><span class="hs-identifier hs-var">_other</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; BlockId -&gt; BlockId -&gt; Maybe Bool -&gt; CmmNode O C
</span><a href="GHC.Cmm.Node.html#CmmCondBranch"><span class="hs-identifier hs-var">CmmCondBranch</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043676"><span class="hs-identifier hs-var">test'</span></a></span><span> </span><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681043679"><span class="hs-identifier hs-var">true</span></a></span><span> </span><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681043678"><span class="hs-identifier hs-var">false</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Bool
</span><a href="#local-6989586621681043677"><span class="hs-identifier hs-var">likely</span></a></span><span>
</span><span id="line-1170"></span><span>
</span><span id="line-1171"></span><span>        </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmSwitch"><span class="hs-identifier hs-type">CmmSwitch</span></a></span><span> </span><span id="local-6989586621681043666"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043666"><span class="hs-identifier hs-var">expr</span></a></span></span><span> </span><span id="local-6989586621681043665"><span class="annot"><span class="annottext">SwitchTargets
</span><a href="#local-6989586621681043665"><span class="hs-identifier hs-var">ids</span></a></span></span><span>
</span><span id="line-1172"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621681043664"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043664"><span class="hs-identifier hs-var">expr'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReferenceKind -&gt; CmmExpr -&gt; CmmOptM CmmExpr
</span><a href="GHC.CmmToAsm.html#cmmExprConFold"><span class="hs-identifier hs-var">cmmExprConFold</span></a></span><span> </span><span class="annot"><span class="annottext">ReferenceKind
</span><a href="GHC.CmmToAsm.PIC.html#DataReference"><span class="hs-identifier hs-var">DataReference</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043666"><span class="hs-identifier hs-var">expr</span></a></span><span>
</span><span id="line-1173"></span><span>                 </span><span class="annot"><span class="annottext">CmmNode O C -&gt; CmmOptM (CmmNode O C)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmNode O C -&gt; CmmOptM (CmmNode O C))
-&gt; CmmNode O C -&gt; CmmOptM (CmmNode O C)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; SwitchTargets -&gt; CmmNode O C
</span><a href="GHC.Cmm.Node.html#CmmSwitch"><span class="hs-identifier hs-var">CmmSwitch</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043664"><span class="hs-identifier hs-var">expr'</span></a></span><span> </span><span class="annot"><span class="annottext">SwitchTargets
</span><a href="#local-6989586621681043665"><span class="hs-identifier hs-var">ids</span></a></span><span>
</span><span id="line-1174"></span><span>
</span><span id="line-1175"></span><span>        </span><span id="local-6989586621681043663"><span class="annot"><span class="annottext">CmmNode e x
</span><a href="#local-6989586621681043663"><span class="hs-identifier hs-var">other</span></a></span></span><span>
</span><span id="line-1176"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmNode e x -&gt; CmmOptM (CmmNode e x)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">CmmNode e x
</span><a href="#local-6989586621681043663"><span class="hs-identifier hs-var">other</span></a></span><span>
</span><span id="line-1177"></span><span>
</span><span id="line-1178"></span><span class="annot"><a href="GHC.CmmToAsm.html#cmmExprConFold"><span class="hs-identifier hs-type">cmmExprConFold</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.PIC.html#ReferenceKind"><span class="hs-identifier hs-type">ReferenceKind</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.html#CmmOptM"><span class="hs-identifier hs-type">CmmOptM</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span>
</span><span id="line-1179"></span><span id="cmmExprConFold"><span class="annot"><span class="annottext">cmmExprConFold :: ReferenceKind -&gt; CmmExpr -&gt; CmmOptM CmmExpr
</span><a href="GHC.CmmToAsm.html#cmmExprConFold"><span class="hs-identifier hs-var hs-var">cmmExprConFold</span></a></span></span><span> </span><span id="local-6989586621681043662"><span class="annot"><span class="annottext">ReferenceKind
</span><a href="#local-6989586621681043662"><span class="hs-identifier hs-var">referenceKind</span></a></span></span><span> </span><span id="local-6989586621681043661"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043661"><span class="hs-identifier hs-var">expr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-1180"></span><span>    </span><span id="local-6989586621681043660"><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681043660"><span class="hs-identifier hs-var">config</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">CmmOptM NCGConfig
</span><a href="GHC.CmmToAsm.html#getCmmOptConfig"><span class="hs-identifier hs-var">getCmmOptConfig</span></a></span><span>
</span><span id="line-1181"></span><span>
</span><span id="line-1182"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681043659"><span class="annot"><span class="annottext">expr' :: CmmExpr
</span><a href="#local-6989586621681043659"><span class="hs-identifier hs-var hs-var">expr'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NCGConfig -&gt; Bool
</span><a href="GHC.CmmToAsm.Config.html#ncgDoConstantFolding"><span class="hs-identifier hs-var hs-var">ncgDoConstantFolding</span></a></span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681043660"><span class="hs-identifier hs-var">config</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1183"></span><span>                    </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043661"><span class="hs-identifier hs-var">expr</span></a></span><span>
</span><span id="line-1184"></span><span>                    </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">NCGConfig -&gt; CmmExpr -&gt; CmmExpr
</span><a href="GHC.CmmToAsm.html#cmmExprCon"><span class="hs-identifier hs-var">cmmExprCon</span></a></span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681043660"><span class="hs-identifier hs-var">config</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043661"><span class="hs-identifier hs-var">expr</span></a></span><span>
</span><span id="line-1185"></span><span>
</span><span id="line-1186"></span><span>    </span><span class="annot"><span class="annottext">ReferenceKind -&gt; CmmExpr -&gt; CmmOptM CmmExpr
</span><a href="GHC.CmmToAsm.html#cmmExprNative"><span class="hs-identifier hs-var">cmmExprNative</span></a></span><span> </span><span class="annot"><span class="annottext">ReferenceKind
</span><a href="#local-6989586621681043662"><span class="hs-identifier hs-var">referenceKind</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043659"><span class="hs-identifier hs-var">expr'</span></a></span><span>
</span><span id="line-1187"></span><span>
</span><span id="line-1188"></span><span class="annot"><a href="GHC.CmmToAsm.html#cmmExprCon"><span class="hs-identifier hs-type">cmmExprCon</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Config.html#NCGConfig"><span class="hs-identifier hs-type">NCGConfig</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span>
</span><span id="line-1189"></span><span id="cmmExprCon"><span class="annot"><span class="annottext">cmmExprCon :: NCGConfig -&gt; CmmExpr -&gt; CmmExpr
</span><a href="GHC.CmmToAsm.html#cmmExprCon"><span class="hs-identifier hs-var hs-var">cmmExprCon</span></a></span></span><span> </span><span id="local-6989586621681043655"><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681043655"><span class="hs-identifier hs-var">config</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLoad"><span class="hs-identifier hs-type">CmmLoad</span></a></span><span> </span><span id="local-6989586621681043653"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043653"><span class="hs-identifier hs-var">addr</span></a></span></span><span> </span><span id="local-6989586621681043652"><span class="annot"><span class="annottext">CmmType
</span><a href="#local-6989586621681043652"><span class="hs-identifier hs-var">rep</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; CmmType -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLoad"><span class="hs-identifier hs-var">CmmLoad</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NCGConfig -&gt; CmmExpr -&gt; CmmExpr
</span><a href="GHC.CmmToAsm.html#cmmExprCon"><span class="hs-identifier hs-var">cmmExprCon</span></a></span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681043655"><span class="hs-identifier hs-var">config</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043653"><span class="hs-identifier hs-var">addr</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">CmmType
</span><a href="#local-6989586621681043652"><span class="hs-identifier hs-var">rep</span></a></span><span>
</span><span id="line-1190"></span><span class="annot"><a href="GHC.CmmToAsm.html#cmmExprCon"><span class="hs-identifier hs-var">cmmExprCon</span></a></span><span> </span><span id="local-6989586621681043651"><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681043651"><span class="hs-identifier hs-var">config</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmMachOp"><span class="hs-identifier hs-type">CmmMachOp</span></a></span><span> </span><span id="local-6989586621681043649"><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681043649"><span class="hs-identifier hs-var">mop</span></a></span></span><span> </span><span id="local-6989586621681043648"><span class="annot"><span class="annottext">[CmmExpr]
</span><a href="#local-6989586621681043648"><span class="hs-identifier hs-var">args</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-1191"></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; MachOp -&gt; [CmmExpr] -&gt; CmmExpr
</span><a href="GHC.Cmm.Opt.html#cmmMachOpFold"><span class="hs-identifier hs-var">cmmMachOpFold</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NCGConfig -&gt; Platform
</span><a href="GHC.CmmToAsm.Config.html#ncgPlatform"><span class="hs-identifier hs-var hs-var">ncgPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681043651"><span class="hs-identifier hs-var">config</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681043649"><span class="hs-identifier hs-var">mop</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(CmmExpr -&gt; CmmExpr) -&gt; [CmmExpr] -&gt; [CmmExpr]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NCGConfig -&gt; CmmExpr -&gt; CmmExpr
</span><a href="GHC.CmmToAsm.html#cmmExprCon"><span class="hs-identifier hs-var">cmmExprCon</span></a></span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681043651"><span class="hs-identifier hs-var">config</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[CmmExpr]
</span><a href="#local-6989586621681043648"><span class="hs-identifier hs-var">args</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1192"></span><span class="annot"><a href="GHC.CmmToAsm.html#cmmExprCon"><span class="hs-identifier hs-var">cmmExprCon</span></a></span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681043647"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043647"><span class="hs-identifier hs-var">other</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043647"><span class="hs-identifier hs-var">other</span></a></span><span>
</span><span id="line-1193"></span><span>
</span><span id="line-1194"></span><span class="hs-comment">-- handles both PIC and non-PIC cases... a very strange mixture</span><span>
</span><span id="line-1195"></span><span class="hs-comment">-- of things to do.</span><span>
</span><span id="line-1196"></span><span class="annot"><a href="GHC.CmmToAsm.html#cmmExprNative"><span class="hs-identifier hs-type">cmmExprNative</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.PIC.html#ReferenceKind"><span class="hs-identifier hs-type">ReferenceKind</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.html#CmmOptM"><span class="hs-identifier hs-type">CmmOptM</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span>
</span><span id="line-1197"></span><span id="cmmExprNative"><span class="annot"><span class="annottext">cmmExprNative :: ReferenceKind -&gt; CmmExpr -&gt; CmmOptM CmmExpr
</span><a href="GHC.CmmToAsm.html#cmmExprNative"><span class="hs-identifier hs-var hs-var">cmmExprNative</span></a></span></span><span> </span><span id="local-6989586621681043646"><span class="annot"><span class="annottext">ReferenceKind
</span><a href="#local-6989586621681043646"><span class="hs-identifier hs-var">referenceKind</span></a></span></span><span> </span><span id="local-6989586621681043645"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043645"><span class="hs-identifier hs-var">expr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-1198"></span><span>     </span><span id="local-6989586621681043644"><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681043644"><span class="hs-identifier hs-var">config</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">CmmOptM NCGConfig
</span><a href="GHC.CmmToAsm.html#getCmmOptConfig"><span class="hs-identifier hs-var">getCmmOptConfig</span></a></span><span>
</span><span id="line-1199"></span><span>     </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681043643"><span class="annot"><span class="annottext">platform :: Platform
</span><a href="#local-6989586621681043643"><span class="hs-identifier hs-var hs-var">platform</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NCGConfig -&gt; Platform
</span><a href="GHC.CmmToAsm.Config.html#ncgPlatform"><span class="hs-identifier hs-var hs-var">ncgPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681043644"><span class="hs-identifier hs-var">config</span></a></span><span>
</span><span id="line-1200"></span><span>         </span><span id="local-6989586621681043642"><span class="annot"><span class="annottext">arch :: Arch
</span><a href="#local-6989586621681043642"><span class="hs-identifier hs-var hs-var">arch</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Arch
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformArch"><span class="hs-identifier hs-var">platformArch</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681043643"><span class="hs-identifier hs-var">platform</span></a></span><span>
</span><span id="line-1201"></span><span>     </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043645"><span class="hs-identifier hs-var">expr</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1202"></span><span>        </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLoad"><span class="hs-identifier hs-type">CmmLoad</span></a></span><span> </span><span id="local-6989586621681043641"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043641"><span class="hs-identifier hs-var">addr</span></a></span></span><span> </span><span id="local-6989586621681043640"><span class="annot"><span class="annottext">CmmType
</span><a href="#local-6989586621681043640"><span class="hs-identifier hs-var">rep</span></a></span></span><span>
</span><span id="line-1203"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621681043639"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043639"><span class="hs-identifier hs-var">addr'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReferenceKind -&gt; CmmExpr -&gt; CmmOptM CmmExpr
</span><a href="GHC.CmmToAsm.html#cmmExprNative"><span class="hs-identifier hs-var">cmmExprNative</span></a></span><span> </span><span class="annot"><span class="annottext">ReferenceKind
</span><a href="GHC.CmmToAsm.PIC.html#DataReference"><span class="hs-identifier hs-var">DataReference</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043641"><span class="hs-identifier hs-var">addr</span></a></span><span>
</span><span id="line-1204"></span><span>                 </span><span class="annot"><span class="annottext">CmmExpr -&gt; CmmOptM CmmExpr
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; CmmOptM CmmExpr) -&gt; CmmExpr -&gt; CmmOptM CmmExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; CmmType -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLoad"><span class="hs-identifier hs-var">CmmLoad</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043639"><span class="hs-identifier hs-var">addr'</span></a></span><span> </span><span class="annot"><span class="annottext">CmmType
</span><a href="#local-6989586621681043640"><span class="hs-identifier hs-var">rep</span></a></span><span>
</span><span id="line-1205"></span><span>
</span><span id="line-1206"></span><span>        </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmMachOp"><span class="hs-identifier hs-type">CmmMachOp</span></a></span><span> </span><span id="local-6989586621681043638"><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681043638"><span class="hs-identifier hs-var">mop</span></a></span></span><span> </span><span id="local-6989586621681043637"><span class="annot"><span class="annottext">[CmmExpr]
</span><a href="#local-6989586621681043637"><span class="hs-identifier hs-var">args</span></a></span></span><span>
</span><span id="line-1207"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621681043636"><span class="annot"><span class="annottext">[CmmExpr]
</span><a href="#local-6989586621681043636"><span class="hs-identifier hs-var">args'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; CmmOptM CmmExpr) -&gt; [CmmExpr] -&gt; CmmOptM [CmmExpr]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ReferenceKind -&gt; CmmExpr -&gt; CmmOptM CmmExpr
</span><a href="GHC.CmmToAsm.html#cmmExprNative"><span class="hs-identifier hs-var">cmmExprNative</span></a></span><span> </span><span class="annot"><span class="annottext">ReferenceKind
</span><a href="GHC.CmmToAsm.PIC.html#DataReference"><span class="hs-identifier hs-var">DataReference</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[CmmExpr]
</span><a href="#local-6989586621681043637"><span class="hs-identifier hs-var">args</span></a></span><span>
</span><span id="line-1208"></span><span>                 </span><span class="annot"><span class="annottext">CmmExpr -&gt; CmmOptM CmmExpr
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; CmmOptM CmmExpr) -&gt; CmmExpr -&gt; CmmOptM CmmExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">MachOp -&gt; [CmmExpr] -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmMachOp"><span class="hs-identifier hs-var">CmmMachOp</span></a></span><span> </span><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681043638"><span class="hs-identifier hs-var">mop</span></a></span><span> </span><span class="annot"><span class="annottext">[CmmExpr]
</span><a href="#local-6989586621681043636"><span class="hs-identifier hs-var">args'</span></a></span><span>
</span><span id="line-1209"></span><span>
</span><span id="line-1210"></span><span>        </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-type">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmBlock"><span class="hs-identifier hs-type">CmmBlock</span></a></span><span> </span><span id="local-6989586621681043634"><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681043634"><span class="hs-identifier hs-var">id</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-1211"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ReferenceKind -&gt; CmmExpr -&gt; CmmOptM CmmExpr
</span><a href="GHC.CmmToAsm.html#cmmExprNative"><span class="hs-identifier hs-var">cmmExprNative</span></a></span><span> </span><span class="annot"><span class="annottext">ReferenceKind
</span><a href="#local-6989586621681043646"><span class="hs-identifier hs-var">referenceKind</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CLabel -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmLabel"><span class="hs-identifier hs-var">CmmLabel</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BlockId -&gt; CLabel
</span><a href="GHC.Cmm.BlockId.html#infoTblLbl"><span class="hs-identifier hs-var">infoTblLbl</span></a></span><span> </span><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681043634"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1212"></span><span>           </span><span class="hs-comment">-- we must convert block Ids to CLabels here, because we</span><span>
</span><span id="line-1213"></span><span>           </span><span class="hs-comment">-- might have to do the PIC transformation.  Hence we must</span><span>
</span><span id="line-1214"></span><span>           </span><span class="hs-comment">-- not modify BlockIds beyond this point.</span><span>
</span><span id="line-1215"></span><span>
</span><span id="line-1216"></span><span>        </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-type">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLabel"><span class="hs-identifier hs-type">CmmLabel</span></a></span><span> </span><span id="local-6989586621681043631"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681043631"><span class="hs-identifier hs-var">lbl</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-1217"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-1218"></span><span>                </span><span class="annot"><span class="annottext">NCGConfig -&gt; ReferenceKind -&gt; CLabel -&gt; CmmOptM CmmExpr
forall (m :: * -&gt; *).
CmmMakeDynamicReferenceM m =&gt;
NCGConfig -&gt; ReferenceKind -&gt; CLabel -&gt; m CmmExpr
</span><a href="GHC.CmmToAsm.PIC.html#cmmMakeDynamicReference"><span class="hs-identifier hs-var">cmmMakeDynamicReference</span></a></span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681043644"><span class="hs-identifier hs-var">config</span></a></span><span> </span><span class="annot"><span class="annottext">ReferenceKind
</span><a href="#local-6989586621681043646"><span class="hs-identifier hs-var">referenceKind</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681043631"><span class="hs-identifier hs-var">lbl</span></a></span><span>
</span><span id="line-1219"></span><span>        </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-type">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLabelOff"><span class="hs-identifier hs-type">CmmLabelOff</span></a></span><span> </span><span id="local-6989586621681043628"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681043628"><span class="hs-identifier hs-var">lbl</span></a></span></span><span> </span><span id="local-6989586621681043627"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681043627"><span class="hs-identifier hs-var">off</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-1220"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-1221"></span><span>                 </span><span id="local-6989586621681043626"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043626"><span class="hs-identifier hs-var">dynRef</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">NCGConfig -&gt; ReferenceKind -&gt; CLabel -&gt; CmmOptM CmmExpr
forall (m :: * -&gt; *).
CmmMakeDynamicReferenceM m =&gt;
NCGConfig -&gt; ReferenceKind -&gt; CLabel -&gt; m CmmExpr
</span><a href="GHC.CmmToAsm.PIC.html#cmmMakeDynamicReference"><span class="hs-identifier hs-var">cmmMakeDynamicReference</span></a></span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681043644"><span class="hs-identifier hs-var">config</span></a></span><span> </span><span class="annot"><span class="annottext">ReferenceKind
</span><a href="#local-6989586621681043646"><span class="hs-identifier hs-var">referenceKind</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681043628"><span class="hs-identifier hs-var">lbl</span></a></span><span>
</span><span id="line-1222"></span><span>                 </span><span class="hs-comment">-- need to optimize here, since it's late</span><span>
</span><span id="line-1223"></span><span>                 </span><span class="annot"><span class="annottext">CmmExpr -&gt; CmmOptM CmmExpr
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; CmmOptM CmmExpr) -&gt; CmmExpr -&gt; CmmOptM CmmExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Platform -&gt; MachOp -&gt; [CmmExpr] -&gt; CmmExpr
</span><a href="GHC.Cmm.Opt.html#cmmMachOpFold"><span class="hs-identifier hs-var">cmmMachOpFold</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681043643"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Width -&gt; MachOp
</span><a href="GHC.Cmm.MachOp.html#MO_Add"><span class="hs-identifier hs-var">MO_Add</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; Width
</span><a href="GHC.Cmm.Type.html#wordWidth"><span class="hs-identifier hs-var">wordWidth</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681043643"><span class="hs-identifier hs-var">platform</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span>
</span><span id="line-1224"></span><span>                     </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043626"><span class="hs-identifier hs-var">dynRef</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1225"></span><span>                     </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmLit -&gt; CmmExpr) -&gt; CmmLit -&gt; CmmExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Width -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-var">CmmInt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Integer
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681043627"><span class="hs-identifier hs-var">off</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; Width
</span><a href="GHC.Cmm.Type.html#wordWidth"><span class="hs-identifier hs-var">wordWidth</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681043643"><span class="hs-identifier hs-var">platform</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1226"></span><span>                   </span><span class="hs-special">]</span><span>
</span><span id="line-1227"></span><span>
</span><span id="line-1228"></span><span>        </span><span class="hs-comment">-- On powerpc (non-PIC), it's easier to jump directly to a label than</span><span>
</span><span id="line-1229"></span><span>        </span><span class="hs-comment">-- to use the register table, so we replace these registers</span><span>
</span><span id="line-1230"></span><span>        </span><span class="hs-comment">-- with the corresponding labels:</span><span>
</span><span id="line-1231"></span><span>        </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmReg"><span class="hs-identifier hs-type">CmmReg</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmGlobal"><span class="hs-identifier hs-type">CmmGlobal</span></a></span><span> </span><span class="annot"><span class="annottext">GlobalReg
</span><a href="GHC.Cmm.Expr.html#EagerBlackholeInfo"><span class="hs-identifier hs-var">EagerBlackholeInfo</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1232"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Arch
</span><a href="#local-6989586621681043642"><span class="hs-identifier hs-var">arch</span></a></span><span> </span><span class="annot"><span class="annottext">Arch -&gt; Arch -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Arch
</span><a href="../../ghc-boot/src/GHC.Platform.html#ArchPPC"><span class="hs-identifier hs-var">ArchPPC</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NCGConfig -&gt; Bool
</span><a href="GHC.CmmToAsm.Config.html#ncgPIC"><span class="hs-identifier hs-var hs-var">ncgPIC</span></a></span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681043644"><span class="hs-identifier hs-var">config</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1233"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ReferenceKind -&gt; CmmExpr -&gt; CmmOptM CmmExpr
</span><a href="GHC.CmmToAsm.html#cmmExprNative"><span class="hs-identifier hs-var">cmmExprNative</span></a></span><span> </span><span class="annot"><span class="annottext">ReferenceKind
</span><a href="#local-6989586621681043646"><span class="hs-identifier hs-var">referenceKind</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; CmmOptM CmmExpr) -&gt; CmmExpr -&gt; CmmOptM CmmExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1234"></span><span>             </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CLabel -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmLabel"><span class="hs-identifier hs-var">CmmLabel</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">UnitId -&gt; FastString -&gt; CLabel
</span><a href="GHC.Cmm.CLabel.html#mkCmmCodeLabel"><span class="hs-identifier hs-var">mkCmmCodeLabel</span></a></span><span> </span><span class="annot"><span class="annottext">UnitId
</span><a href="GHC.Unit.Types.html#rtsUnitId"><span class="hs-identifier hs-var">rtsUnitId</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;__stg_EAGER_BLACKHOLE_info&quot;</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1235"></span><span>        </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmReg"><span class="hs-identifier hs-type">CmmReg</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmGlobal"><span class="hs-identifier hs-type">CmmGlobal</span></a></span><span> </span><span class="annot"><span class="annottext">GlobalReg
</span><a href="GHC.Cmm.Expr.html#GCEnter1"><span class="hs-identifier hs-var">GCEnter1</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1236"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Arch
</span><a href="#local-6989586621681043642"><span class="hs-identifier hs-var">arch</span></a></span><span> </span><span class="annot"><span class="annottext">Arch -&gt; Arch -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Arch
</span><a href="../../ghc-boot/src/GHC.Platform.html#ArchPPC"><span class="hs-identifier hs-var">ArchPPC</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NCGConfig -&gt; Bool
</span><a href="GHC.CmmToAsm.Config.html#ncgPIC"><span class="hs-identifier hs-var hs-var">ncgPIC</span></a></span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681043644"><span class="hs-identifier hs-var">config</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1237"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ReferenceKind -&gt; CmmExpr -&gt; CmmOptM CmmExpr
</span><a href="GHC.CmmToAsm.html#cmmExprNative"><span class="hs-identifier hs-var">cmmExprNative</span></a></span><span> </span><span class="annot"><span class="annottext">ReferenceKind
</span><a href="#local-6989586621681043646"><span class="hs-identifier hs-var">referenceKind</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; CmmOptM CmmExpr) -&gt; CmmExpr -&gt; CmmOptM CmmExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1238"></span><span>             </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CLabel -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmLabel"><span class="hs-identifier hs-var">CmmLabel</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">UnitId -&gt; FastString -&gt; CLabel
</span><a href="GHC.Cmm.CLabel.html#mkCmmCodeLabel"><span class="hs-identifier hs-var">mkCmmCodeLabel</span></a></span><span> </span><span class="annot"><span class="annottext">UnitId
</span><a href="GHC.Unit.Types.html#rtsUnitId"><span class="hs-identifier hs-var">rtsUnitId</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;__stg_gc_enter_1&quot;</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1239"></span><span>        </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmReg"><span class="hs-identifier hs-type">CmmReg</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmGlobal"><span class="hs-identifier hs-type">CmmGlobal</span></a></span><span> </span><span class="annot"><span class="annottext">GlobalReg
</span><a href="GHC.Cmm.Expr.html#GCFun"><span class="hs-identifier hs-var">GCFun</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1240"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Arch
</span><a href="#local-6989586621681043642"><span class="hs-identifier hs-var">arch</span></a></span><span> </span><span class="annot"><span class="annottext">Arch -&gt; Arch -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Arch
</span><a href="../../ghc-boot/src/GHC.Platform.html#ArchPPC"><span class="hs-identifier hs-var">ArchPPC</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NCGConfig -&gt; Bool
</span><a href="GHC.CmmToAsm.Config.html#ncgPIC"><span class="hs-identifier hs-var hs-var">ncgPIC</span></a></span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681043644"><span class="hs-identifier hs-var">config</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1241"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ReferenceKind -&gt; CmmExpr -&gt; CmmOptM CmmExpr
</span><a href="GHC.CmmToAsm.html#cmmExprNative"><span class="hs-identifier hs-var">cmmExprNative</span></a></span><span> </span><span class="annot"><span class="annottext">ReferenceKind
</span><a href="#local-6989586621681043646"><span class="hs-identifier hs-var">referenceKind</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; CmmOptM CmmExpr) -&gt; CmmExpr -&gt; CmmOptM CmmExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1242"></span><span>             </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CLabel -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmLabel"><span class="hs-identifier hs-var">CmmLabel</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">UnitId -&gt; FastString -&gt; CLabel
</span><a href="GHC.Cmm.CLabel.html#mkCmmCodeLabel"><span class="hs-identifier hs-var">mkCmmCodeLabel</span></a></span><span> </span><span class="annot"><span class="annottext">UnitId
</span><a href="GHC.Unit.Types.html#rtsUnitId"><span class="hs-identifier hs-var">rtsUnitId</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;__stg_gc_fun&quot;</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1243"></span><span>
</span><span id="line-1244"></span><span>        </span><span id="local-6989586621681043616"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043616"><span class="hs-identifier hs-var">other</span></a></span></span><span>
</span><span id="line-1245"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; CmmOptM CmmExpr
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681043616"><span class="hs-identifier hs-var">other</span></a></span><span>
</span><span id="line-1246"></span><span>
</span><span id="line-1247"></span></pre></body></html>